Welcome to the Kivy/Buildozer VM

Thanks for using Kivy/Buildozer VM. It has been installed only for packaging Kivy application for Android.
Credentials: username: kivy / password: kivy

How to use the VM

Buildozer is ready to be used. You'll need internet connection for download the Android SDK/NDK (automatically done), and during the first compilation.
It is preferable to add a share a folder between your host and the VM, then build from there.
By the time we shipped the VM and you using it, you may need to update buildozer.

Don't try to use latest Android SDK or NDK. The defaults from buildozer works: Android SDK 20, Android NDK 9c. Recent Android SDK doesn't work the same as before (no more android command), and python-for-android project have issues with it. As for NDK, you can use 13b, it works too.

  1. First time only, in your project directory: buildozer init
  2. Adjust the buildozer.spec:
    [buildozer]
    # change the name of your app
    package.name = myapp
    
    # change the domain of your package
    package.domain = com.mydomain
    
    # specify hostpython2 manually. If you want to use python 3, check buildozer
    # README about it, the VM is not preinstalled for that.
    requirements = hostpython2,kivy
    
    [buildozer]
    # update the build directory (issue with virtualbox shared folder and symlink)
    build_dir = /build/myapp
    
  3. Build your application: buildozer android debug
  4. Build and deploy, run and get the logs: buildozer android debug deploy run logcat

Share a folder

Virtualbox allows you to share a folder between your computer and the VM. To do, just:

  1. Go into Devices > Shared Folders > Shared Folders Settings
  2. Add a new folder, select the automount option
  3. Reboot the VM (that's easier)
  4. You'll find your new directory at /media/sf_directoryname

Virtualbox doesn't support symlink in Shared Folder anymore. So buildozer will fail during the build.
We already created a /build directory where you can put your build in it. Edit your buildozer.ini:
[buildozer]
build_dir = /build/buildozer-myapp

Update buildozer

The buildozer version you have may be outdated, as well as the dependencies. The best is to regularly update buildozer:

sudo pip install -U buildozer

Cleaning cache

The simplest way to update kivy and other modules is to clean all the buildozer cache, and rebuild everything.

rm -rf ~/.buildozer/android/packages