Search code examples
pythonkivybuildozer

Buildozer (python-for-android) error message about python2


Trying to compile an apk using buildozer 0.39 on a Ubuntu 18.04 VM. I get a strange error:

# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=XXXXXX --bootstrap=sdl2 --requirements=python2,kivy,sqlite3,requests,feedparser,html2bbcode --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/4Build/XXXXXX/.buildozer/android/platform/build" --ndk-api=21'
# Cwd /home/kivy/4Build/XXXXXX/.buildozer/android/platform/python-for-android
[ERROR]:   Build failed: python-for-android no longer supports running under Python 2. Either upgrade to Python 3.4 or higher (recommended), or revert to python-for-android 2019.07.08. Note that you *can* still target Python 2 on Android by including python2 in your requirements.

The command I use includes the python2 requirement, but python-for-android says its not...


Solution

  • Well, converting the project to Python 3 and compiling it using the newer VM (that I found here) did work!
    Still no way to do it with Python 2 though..