Google App API Change To 28

503 views
Skip to first unread message

Horace Johnson

unread,
Dec 4, 2019, 10:50:14 PM12/4/19
to Kivy users support
I got that error again when trying to upload an App to google console.  I was just wondering if Buildozer has an update or do I just specify api level 28 in the spec file?  Has anyone successfully move to api level 28?

Horace Johnson

unread,
Dec 5, 2019, 2:02:05 AM12/5/19
to Kivy users support
This is why working with Buildozer can be so stressful....  It's really fragile.  I set the target api to 28 and compiled the app, but the Google Console was saying the apk was still api level 27.  So I figured maybe I need to update NDK.  I felt dread even before trying this because Buildzoer always seems to break when ever you trying to download a different SDK, NDK that wasn't set by default in the current Buildozer build (0.40).

Sure enough....  I download NDK 20 and tried in combo with api 28 and Buildozer broke.  When I say broke....I mean, I couldn't even go back to 17c because once Buildozer errors...  It's broken.


======================================================================================

[INFO]: hmtsc has compatible recipes, using this one

[INFO]: Of the existing distributions, the following meet the given requirements:

[INFO]: hmtsc: min API 21, includes recipes (hostpython2, sdl2_image, sdl2_mixer, sdl2_ttf, python2, sdl2, six, pyjnius, android, kivy), built for archs (armeabi-v7a)

[INFO]: hmtsc has compatible recipes, using this one

[INFO]: -> directory context /home/kivy/Desktop/HMT/.buildozer/android/platform/build/dists/hmtsc

Could not find platform independent libraries <prefix>

Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]

ImportError: No module named site

WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.

No compiled python is present to zip, skipping.

No setup.py/pyproject.toml used, copying full private data into .apk.

Error while running "/home/kivy/Desktop/HMT/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build/python -OO -m compileall -f /tmp/p4a-extra-env-iHUIZb"

This probably means one of your Python files has a syntax error, see logs above

# Command failed: /usr/bin/python2.7 -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name hmtsc --name 'Monnolog' --version 0.1 --package haven.com.hmtsc --android_api 27 --minsdk 21 --ndk-api 21 --private /home/kivy/Desktop/HMT/.buildozer/android/app --permission INTERNET --permission WRITE_EXTERNAL_STORAGE --permission READ_EXTERNAL_STORAGE --presplash /home/kivy/Desktop/HMT/./cab/splash.png --icon /home/kivy/Desktop/HMT/./cab/icon.png --orientation portrait --copy-libs --arch armeabi-v7a --color=always --storage-dir="/home/kivy/Desktop/HMT/.buildozer/android/platform/build" --ndk-api=21

# ENVIRONMENT:

# QT4_IM_MODULE = 'xim'

# GJS_DEBUG_OUTPUT = 'stderr'

# WINDOWPATH = '1'

# XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'

# XDG_SESSION_TYPE = 'x11'

# QT_IM_MODULE = 'xim'

# LOGNAME = 'kivy'

# USER = 'kivy'

# PATH = '/home/kivy/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/kivy/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'

# XDG_VTNR = '1'

# HOME = '/home/kivy'

# DISPLAY = ':0'

# SSH_AGENT_PID = '1126'

# LANG = 'en_US.UTF-8'

# TERM = 'xterm-256color'

# SHELL = '/bin/bash'

# ANDROIDMINAPI = '21'

# XAUTHORITY = '/run/user/1000/gdm/Xauthority'

# PACKAGES_PATH = '/home/kivy/.buildozer/android/packages'

# SESSION_MANAGER = 'local/kivy-VirtualBox:@/tmp/.ICE-unix/989,unix/kivy-VirtualBox:/tmp/.ICE-unix/989'

# XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop'

# ANDROIDSDK = '/home/kivy/.buildozer/android/platform/android-sdk'

# QT_ACCESSIBILITY = '1'

# GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'

# CLUTTER_IM_MODULE = 'xim'

# TEXTDOMAIN = 'im-config'

# XMODIFIERS = '@im=ibus'

# GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'

# USERNAME = 'kivy'

# XDG_SESSION_DESKTOP = 'ubuntu'

# XDG_RUNTIME_DIR = '/run/user/1000'

# SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'

# VTE_VERSION = '5202'

# GDMSESSION = 'ubuntu'

# IM_CONFIG_PHASE = '2'

# TEXTDOMAINDIR = '/usr/share/locale/'

# GNOME_SHELL_SESSION_MODE = 'ubuntu'

# XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'

# LESSOPEN = '| /usr/bin/lesspipe %s'

# XDG_SESSION_ID = '1'

# DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'

# _ = '/usr/local/bin/buildozer'

# GNOME_TERMINAL_SERVICE = ':1.146'

# GTK_IM_MODULE = 'ibus'

# DESKTOP_SESSION = 'ubuntu'

# LESSCLOSE = '/usr/bin/lesspipe %s %s'

# GTK_MODULES = 'gail:atk-bridge'

# XDG_SEAT = 'seat0'

# OLDPWD = '/home/kivy'

# ANDROIDNDK = '/home/kivy/.buildozer/android/platform/android-ndk-r17c'

# SHLVL = '1'

# PWD = '/home/kivy/Desktop/HMT'

# ANDROIDAPI = '27'

# COLORTERM = 'truecolor'

# XDG_MENU_PREFIX = 'gnome-'

# LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'

# GJS_DEBUG_TOPICS = 'JS ERROR;JS LOG'

# GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/0c16baad_d4d4_449f_b191_e4b67c77212d'

#

# Buildozer failed to execute the last command

# The error might be hidden in the log above this error

# Please read the full log, and search for it before

# raising an issue with buildozer itself.

# In case of a bug report, please add a full log with log_level = 2

kivy@kivy-VirtualBox:~/Desktop/HMT$


==================================================================================================

I noticed the line that says syntax error in my modules.  Trust me.... There is no syntax error in my modules because I was compiling apks before I trying the upgrade the NDK.

So at this point....   Am I dead in the water?  As far as compiling an apk with Buildoer 0.40 dev.

This is the second time now I've been hit the the api level not high enough issue after finishing a project.    :(


 
Buildozer_ErrorX.odt

Horace Johnson

unread,
Dec 5, 2019, 4:22:39 AM12/5/19
to Kivy users support
Since Buildozer is broken and I can't re-download files for it because python 2.7 has been drop already, I can only try my project with python 3.4 now.  So here I am trying to install kivy 1.11.0 on Win7 for the first time.


python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2==0.1.* kivy_deps.glew==0.1.*


 Pypiwin32 will not go...  No version satisfy the requirement....

God!  The read error writing is killing me!

Is there some other version I'm suppose to install?

Horace Johnson

unread,
Dec 5, 2019, 7:52:01 AM12/5/19
to Kivy users support
I see...  I got confused.  Buildozer says P4a is python 3.4.  kivy.org says python 3.5 can be used with Windows.....   So if I indeed successfully convert my project from python 2.7 to python 3.4, would there not still be issues when I try to build and apk because Buildozer is not based on python 3.5...?

Guys...  What's going on? 

Horace Johnson

unread,
Dec 5, 2019, 8:46:40 AM12/5/19
to Kivy users support
Inside my app, I construct file paths based on OS.  Running kivy on windows, installed, for the first time, all my paths point to C:\Windows\system32 as if my app directory is there...it is not.  My function that build paths look in the current directory of the project.

Is there anyway I can fix this behavior so my path construction function works correctly?

Alexander Taylor

unread,
Dec 5, 2019, 4:41:11 PM12/5/19
to Kivy users support
> I was just wondering if Buildozer has an update or do I just specify api level 28 in the spec file?

It should be sufficient to specify api level 28, even with NDK 17c, but you'll also need to make buildozer rebuild your app by deleting the .buildozer directory in your app dir and running it again.

> but the Google Console was saying the apk was still api level 27

You were probably recompiling without the new api actually being written. This is ultimately a p4a bug, which is the reason you need to rebuild the android project when you change the api.

> Sure enough....  I download NDK 20 and tried in combo with api 28 and Buildozer broke.

The latest release of python-for-android is not compatible with NDK 20. If you want to use it, you must use the python-for-android develop branch. You might also need to use buildozer's master branch, but I think that shouldn't be necessary.

> Since Buildozer is broken and I can't re-download files for it because python 2.7 has been drop already

I don't understand this statement, buildozer should work fine with Python 3.

> I can only try my project with python 3.4 now

I don't understand this either - why not use Python 3.7 (the version that p4a actually supports)? Also, you can build Python 2 APKs with buildozer even if running under Python 3.

> Sure enough....  I download NDK 20 and tried in combo with api 28 and Buildozer broke.

It sounds like your filepath code is buggy and you should debug it.

> Sure enough....  I download NDK 20 and tried in combo with api 28 and Buildozer broke.

Why can't you delete NDK 20 and run buildozer from scratch again? At worst, delete ~/.buildozer and all of its stored NDK/SDK stuff will be gone, although it will then download it again.

Horace Johnson

unread,
Dec 5, 2019, 4:56:46 PM12/5/19
to Kivy users support
I deleted the .buildozer folder in the project folder and tried to re-download but an exception raise, stating that python 2.7 is not supported by P4A anymore and my project was currently using python 2.7, therefore the Buildozer downloading stops.

I have since installed python 3.5 on windows, along with kivy 1.11.1 and manage to convert my 2.7 project to python 3.5.  My concern now is, what do I specify with buildozer since it uses python 3.4 and I'm using python 3.5? (kivy.org does not use 3.4 for windows)   Can I just build the apk with 3.4 anyway?  I don't think 3.4 and 3.5 python are that different.

Hell, the only thing I needed to change was urlretrieve....since it's in urllib.requests in later python versions.

Also, do I need to re-build the Linux Ubuntu Virtual Machine Buildozer with python 3.4 targeted.   I don't think there's a newer Buildozer than the 0.40 I was using. 

Alexander Taylor

unread,
Dec 5, 2019, 5:02:06 PM12/5/19
to kivy-...@googlegroups.com

The message about not supporting Python 2.7 should also have explicitly stated that you can still build apps targeting Python 2. The point is that you cannot run python-for-android (and therefore buildozer) under Python 2 any more, not that they can't build apps targeting Python 2 on Android.

Likewise, it really doesn't matter what Python 3 version you use as long as it meets the minimum supported by p4a. I'd actually use 3.6+, I think the 3.4 might be wrong although it's probably adequate. Whatever you choose, the version of Python your app runs on android will be 2.7 (if you target python2) or 3.7 (if you target python3).

It sounds like you've understood that buildozer requires python 3.4. This is incorrect, if you read the message it should say 3.4 *or higher*.

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/eOW9BcsO4lQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/9eaa8241-17d6-468e-bc26-6298c443b3be%40googlegroups.com.

Horace Johnson

unread,
Dec 5, 2019, 5:14:29 PM12/5/19
to Kivy users support
Sounds like you stating I should re-build the virtual machine then.  I followed the Buildozer build for python 2.7 online.  There is a 3.4 instruction build online that uses pip3 and so on.  Is that what you're getting at? 

Alexander Taylor

unread,
Dec 5, 2019, 5:16:32 PM12/5/19
to kivy-...@googlegroups.com

No, you don't need to rebuild the virtual machine.

I don't know what buildozer instructions you're referring to, but you shouldn't have to do anything special except install it with pip and run it, especially if you've successfully run it in the past.

On 05/12/2019 22:14, Horace Johnson wrote:
Sounds like you stating I should re-build the virtual machine then.  I followed the Buildozer build for python 2.7 online.  There is a 3.4 instruction build online that uses pip3 and so on.  Is that what you're getting at? 
--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/eOW9BcsO4lQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

Horace Johnson

unread,
Dec 5, 2019, 5:23:11 PM12/5/19
to Kivy users support
I just going to try the re-download again later but this time NOT specify any python version so it can just work with the already 3.4 and cross my fingers.

Horace Johnson

unread,
Dec 5, 2019, 5:40:01 PM12/5/19
to Kivy users support
"Build failed: python-for-android no longer supports running under Python 2."

 #Run '/user/bin/python2.7 -m pythonforandroid.....


It really looks like this error is because I used python2 pip to install Buildozer, per instructions.  So it really does look like I have to create another VM and follow the online Buildozer instructions for installing it under python3 (pip3).

It's going to completely unpleasant since it's so difficult piecing Buildozer together.  :(

Alexander Taylor

unread,
Dec 5, 2019, 6:15:32 PM12/5/19
to kivy-...@googlegroups.com

Again, why would you have to create another VM? Just install python3, then install buildozer in python3, then run buildozer.

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/eOW9BcsO4lQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

Horace Johnson

unread,
Dec 6, 2019, 12:06:22 AM12/6/19
to Kivy users support


On Thursday, December 5, 2019 at 6:15:32 PM UTC-5, Alexander Taylor wrote:

Again, why would you have to create another VM? Just install python3, then install buildozer in python3, then run buildozer.

   


       


Dependencies are placed within python 2.7 and I'm afraid if I don't do a clean VM, I'll just have trouble when trying run Buildozer.  For the sake of not having to deal with trying to piece it all together again, I think I'll trying the Buildozer uninstall first and install it in python3 and pip3 the dependencies.

 

Robert Flatt

unread,
Dec 6, 2019, 1:06:25 AM12/6/19
to Kivy users support
To run Buildozer you don't need to install Kivy, Kivy's Python dependencies, or the app Python dependencies.
To run Buildozer you do need Python 3, and I think minimum Python 3.6. So on the Linux desktop install Python 3.6 or 3.7
Just install Buildozer with pip3

When it runs Buildozer downloads whatever it needs for Android including the Python that will be used on Android
The Android Python is specified by "requirements = python3" or "requirements = python2"
The first will download Python 3.7 the second Python 2.7

I for example have Python 3.6 and Kivy, its dependencies, and the app dependencies on Windows for Kivy development, and Python 3.6 and Buildozer on Linux (WSL). The Android app build by Buildozer runs Python 3.7. So that is three different instances of Python which can lead to some confusion when talking about Python version.

I do not have a VM on Windows because despite all the Python packages installed there I do not see an interaction. Linux is just used to build for Android so no need for a VM other than the stuff Buildozer does internally.

FYI I use SDK 29 and NDK r17c . Subject to other requirements you can use any (?) SDK less than 29 (and > 21?), generally use the highest.But don't change the NDK. There is an NDK upgrade in the pipe, but not there yet.

Horace Johnson

unread,
Dec 6, 2019, 6:40:08 PM12/6/19
to Kivy users support
I uninstalled buildozer 0.40-dev from python2, installed pip3 for python3.6 and installed buildozer 0.40-dev to python3.  Installed cython with pip3 and ran buildzoer....


Installing collected packages: cython


Successfully installed cython-0.29.14


kivy@kivy-VirtualBox:~/Desktop/HMT$ buildozer android debug


Traceback (most recent call last):


  File "/usr/local/bin/buildozer", line 11, in <module>


    load_entry_point('buildozer==0.40.dev0', 'console_scripts', 'buildozer')()


  File "/usr/local/lib/python3.6/dist-packages/buildozer/scripts/client.py", line 13, in main


    Buildozer().run_command(sys.argv[1:])


  File "/usr/local/lib/python3.6/dist-packages/buildozer/__init__.py", line 131, in __init__


    self.config.read(filename, "utf-8")


  File "/usr/lib/python3.6/configparser.py", line 697, in read


    self._read(fp, filename)


  File "/usr/lib/python3.6/configparser.py", line 1015, in _read


    for lineno, line in enumerate(fp, start=1):


  File "/usr/lib/python3.6/codecs.py", line 321, in decode


    (result, consumed) = self._buffer_decode(data, self.errors, final)


UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa9 in position 1813: invalid start byte


kivy@kivy-VirtualBox:~/Desktop/HMT$


 

That's what I ended up with.

Horace Johnson

unread,
Dec 6, 2019, 7:40:54 PM12/6/19
to Kivy users support
I wonder if I installed it wrong...?   I ended up with a locked buildozer folder instead of the usual ./buildozer.

So I uninstalled buildozer and got rid of the locked buildozer folder.

Which way is it?

sudo pip3 install --upgrade buildozer

or

pip3 install
--user --upgrade builder



The online docs state:

sudo apt update
sudo apt install
-y git zip unzip openjdk-8-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake
pip3 install
--user --upgrade cython virtualenv  # the --user should be removed if you do this in a venv

# add the following line at the end of your ~/.bashrc file
export PATH=$PATH:~/.local/bin/


 

Robert Flatt

unread,
Dec 6, 2019, 8:34:57 PM12/6/19
to Kivy users support
Definitely do not install Buildozer as root (sudo).  It creates all kinds of issues and needs cleanup.
Oh, too late :(

[Unless you really know why, installing dev versions also just adds uncertainty, which it appears you don't need.]

As a result of running Buildozer as root there is some careful cleanup to do.
If Buildozer terminated early then you may be lucky.
Look in the project directory for folders owned by root (.buildozer ,gradle , and well I don't know the full list) - delete these,
but check the date you do not want to delete root owned folders created before Buildozer was run,

Probably a good idea to check ~/.buildozer too (other root owned directories here are presumably OK)

Horace Johnson

unread,
Dec 6, 2019, 8:59:59 PM12/6/19
to Kivy users support
I don't have a .buildozer folder.....never got one when installing.

So how exactly am I supposed to install buildozer?


kivy@kivy-VirtualBox:~$ sudo pip3 install cython==0.29.9


The directory '/home/kivy/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.


The directory '/home/kivy/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.


Requirement already satisfied: cython==0.29.9 in /usr/local/lib/python3.6/dist-packages


kivy@kivy-VirtualBox:~$ cython --version


bash: /home/kivy/.local/bin/cython: No such file or directory


 

Horace Johnson

unread,
Dec 6, 2019, 9:01:40 PM12/6/19
to Kivy users support
I have done:

sudo pip3 uninstall buildozer
sudo apt purge remove buildozer


No buildozer found. 

Robert Flatt

unread,
Dec 6, 2019, 11:58:26 PM12/6/19
to Kivy users support
The instructions are here, buildozer install is in the first yellow box, Cython is in the second yellow box


So undo the Cython install that was done with sudo. Then follow the instructions.

And more generally, as I read this thread, guessing is not working for you. Don't ever go to Las Vegas.  ;)

Horace Johnson

unread,
Dec 7, 2019, 12:21:42 AM12/7/19
to Kivy users support
So after a fresh VM install of Ubuntu 18.04 and following all the instructs exactly, I get......


kivy@kivy-VirtualBox:~/Desktop/HMT$ buildozer update


Traceback (most recent call last):


  File "/home/kivy/.local/bin/buildozer", line 11, in <module>


    sys.exit(main())


  File "/home/kivy/.local/lib/python3.6/site-packages/buildozer/scripts/client.py", line 13, in main


    Buildozer().run_command(sys.argv[1:])


  File "/home/kivy/.local/lib/python3.6/site-packages/buildozer/__init__.py", line 123, in __init__


    self.config.read(filename, "utf-8")


  File "/usr/lib/python3.6/configparser.py", line 697, in read


    self._read(fp, filename)


  File "/usr/lib/python3.6/configparser.py", line 1015, in _read


    for lineno, line in enumerate(fp, start=1):


  File "/usr/lib/python3.6/codecs.py", line 321, in decode


    (result, consumed) = self._buffer_decode(data, self.errors, final)


UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa9 in position 1813: invalid start byte


kivy@kivy-VirtualBox:~/Desktop/HMT$


 
Someone in the past told me exactly what to do to get past that before.  That's why I had the working Buildozer and the only reason I have to go through this again is because Buildozer can no longer be ran with python2 because p4a needs python3 now.

So after all of this....


and......

cd ~/Desktop/MyProject
MyProject> buildozer android debug  ## ends in above error!
MyProject> buildozer android_new debug  ## ends in above error!



I even added this line to bashrc...

export PATH=$PATH:~/.local/bin/


So what's missing?

Robert Flatt

unread,
Dec 7, 2019, 1:05:41 AM12/7/19
to Kivy users support

kivy@kivy-VirtualBox:~/Desktop/HMT$ buildozer update

What is "buildozer update" ? Doesnt match with this further down....

MyProject> buildozer android debug  ## ends in above error!



Horace Johnson

unread,
Dec 7, 2019, 1:28:03 AM12/7/19
to Kivy users support
OMG!!!!  I figured it out!!!

The DEVS always change the spec file, which means the previous spec file I had did not match the new one.

"Geezus Kryst" why isn't a real error message for this yet?  Something like, "your spec file is old, please run init and use the new spec file."

Now I'm crying.......  :(

Ok...  Buildozer is running so I'm just waiting for the new error.  Because there's always a error. 

Robert Flatt

unread,
Dec 7, 2019, 1:41:08 AM12/7/19
to Kivy users support

Excellent.

Its our baggage (in our heads or in a file system) that bites us  :(

That first run takes a while, so don't hold your breath :)

Horace Johnson

unread,
Dec 7, 2019, 2:27:28 AM12/7/19
to Kivy users support
Ok...  I'm guessing there's a certain manual command I need to enter here.....


# Run '/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=hmtsc --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/Desktop/HMT/.buildozer/android/platform/build" --ndk-api=21'


# Cwd /home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android


[INFO]:    Will compile for the following archs: armeabi-v7a


[INFO]:    Found Android API target in $ANDROIDAPI: 28


[INFO]:    Available Android APIs are ()


[ERROR]:   Build failed: Requested API target 28 is not available, install it with the SDK android tool.


# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=hmtsc --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/Desktop/HMT/.buildozer/android/platform/build" --ndk-api=21


#


# Buildozer failed to execute the last command


# The error might be hidden in the log above this error


# Please read the full log, and search for it before


# raising an issue with buildozer itself.


# In case of a bug report, please add a full log with log_level = 2


 
PS, is api 29 acceptable?



Horace Johnson

unread,
Dec 7, 2019, 4:31:40 AM12/7/19
to Kivy users support
Can buildozer even do an API 28 apk?  It only presents the previous error I posted when trying to build with 28 or 29....basically saying no apis are available.  So just for the hell of it, I tried API 27 and things started rolling like before.

Please tell me buildozer can compile a 28.....because that's the minimum now according to Google's Play Console.

:( 

Alexander Taylor

unread,
Dec 7, 2019, 4:35:49 AM12/7/19
to Kivy users support
Are you using the p4a develop branch and NDK 19 or higher?

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/eOW9BcsO4lQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

Horace Johnson

unread,
Dec 7, 2019, 5:26:55 AM12/7/19
to Kivy users support
I don't install p4a manually....  Buildozer downloads p4a, so I assume in knows what it's doing.

I was looking at this....


If I read this correctly, Buildozer's spec file should already default to API 28 and the NDK and SDK files should be higher...  but that's not true.
Buildozer's default spec file is still set to API 27, r17, etc.....

According to the link in the post, pip3 install --user --upgrade https://github.com/kivy/buildozer/archive/master.zip
That was suppose to be the updated version of Buildozer.  So I tried it and the spec file is the same.


Right now, I'm facing a different problem.  I was just trying to make an apk to at least make sure Buildozer could complete a build so I went with API 27 and python2 again.  This is how it ended...

[INFO]:    Building pyjnius for armeabi-v7a
[INFO]:    jnius apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in pyjnius
[INFO]:    -> directory context /home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a__ndk_target_21/pyjnius
[INFO]:    -> running python -c import sys; print(sys.path)
[INFO]:    Trying first build of pyjnius to get cython files: this is expected to fail
[INFO]:    -> running python setup.py build_ext -v
Exception in thread background thread for pid 11129:                          
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 1540, in wrap
    fn(*args, **kwargs)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 2459, in background_thread
    handle_exit_code(exit_code)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 2157, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython2/desktop/hostpython2/native-build/python setup.py build_ext -v

  STDOUT:
running build_ext
building 'jnius' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/jnius
arm-linux-androideabi-gcc -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/kivy/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -I/home/kivy/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r17c/sysroot -I/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/hmtsc/include/python2.7 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/kivy/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -I/home/kivy/.buildozer/android/platform/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r17c/sysroot -I/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/hmtsc/include/python2.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -I/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python2/armeabi-v7a__ndk_target_21/python2/Include -fPIC -I/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython2/desktop/hostpython2/Include -I/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython2/desktop/hostpython2/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
arm-linux-androideabi-gcc: error: jnius/jnius.c: No such file or directory
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
error: command 'arm-linux-androideabi-gcc' failed with exit status 1


  STDERR:


[INFO]:    pyjnius first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize jnius/jnius.pyx
[INFO]:    -> running python2 -m Cython.Build.Cython...(and 21 more)

Exception in thread background thread for pid 11138:                          
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 1540, in wrap
    fn(*args, **kwargs)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 2459, in background_thread
    handle_exit_code(exit_code)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 2157, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /usr/bin/python2 -m Cython.Build.Cythonize ./jnius/jnius.pyx

  STDOUT:
/usr/bin/python2: No module named Cython.Build


  STDERR:


Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1192, in <module>
    main()
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 668, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 206, in build_dist_from_args
    args, "ignore_setup_py", False
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes
    recipe.build_arch(arch)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 969, in build_arch
    self.build_cython_components(arch)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 994, in build_cython_components
    self.cythonize_build(env=env)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1040, in cythonize_build
    self.cythonize_file(env, build_dir, join(root, filename))
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1031, in cythonize_file
    filename, *self.cython_args, _env=cyenv)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 180, in shprint
    for line in output:
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 863, in next
    self.wait()
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /usr/bin/python2 -m Cython.Build.Cythonize ./jnius/jnius.pyx

  STDOUT:
/usr/bin/python2: No module named Cython.Build


  STDERR:

# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=hmtsc --bootstrap=sdl2 --requirements=python2,kivy==master --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
#     CLUTTER_IM_MODULE = 'xim'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     XDG_MENU_PREFIX = 'gnome-'
#     LANG = 'en_US.UTF-8'
#     DISPLAY = ':0'
#     GNOME_SHELL_SESSION_MODE = 'ubuntu'
#     COLORTERM = 'truecolor'
#     USERNAME = 'kivy'
#     XDG_VTNR = '1'
#     SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
#     XDG_SESSION_ID = '1'
#     USER = 'kivy'
#     DESKTOP_SESSION = 'ubuntu'
#     QT4_IM_MODULE = 'xim'
#     TEXTDOMAINDIR = '/usr/share/locale/'
#     GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/b56e949a_7ba6_4865_90c6_866307256335'
#     PWD = '/home/kivy/Desktop/HMT'
#     HOME = '/home/kivy'
#     TEXTDOMAIN = 'im-config'
#     SSH_AGENT_PID = '1073'
#     QT_ACCESSIBILITY = '1'
#     XDG_SESSION_TYPE = 'x11'
#     XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop'
#     XDG_SESSION_DESKTOP = 'ubuntu'
#     GJS_DEBUG_OUTPUT = 'stderr'
#     GTK_MODULES = 'gail:atk-bridge'
#     WINDOWPATH = '1'
#     TERM = 'xterm-256color'
#     SHELL = '/bin/bash'
#     VTE_VERSION = '5202'
#     QT_IM_MODULE = 'xim'
#     XMODIFIERS = '@im=ibus'
#     IM_CONFIG_PHASE = '2'
#     XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'
#     GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'
#     GNOME_TERMINAL_SERVICE = ':1.79'
#     XDG_SEAT = 'seat0'
#     SHLVL = '1'
#     GDMSESSION = 'ubuntu'
#     GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
#     LOGNAME = 'kivy'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     XAUTHORITY = '/run/user/1000/gdm/Xauthority'
#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'
#     PATH = '/home/kivy/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/kivy/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/kivy/.local/bin/'
#     GJS_DEBUG_TOPICS = 'JS ERROR;JS LOG'
#     SESSION_MANAGER = 'local/kivy-VirtualBox:@/tmp/.ICE-unix/935,unix/kivy-VirtualBox:/tmp/.ICE-unix/935'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     GTK_IM_MODULE = 'ibus'
#     _ = '/home/kivy/.local/bin/buildozer'
#     OLDPWD = '/home/kivy'
#     PACKAGES_PATH = '/home/kivy/.buildozer/android/packages'
#     ANDROIDSDK = '/home/kivy/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/kivy/.buildozer/android/platform/android-ndk-r17c'
#     ANDROIDAPI = '27'
#     ANDROIDMINAPI = '21'
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
kivy@kivy-VirtualBox:~/Desktop/HMT$ 


Could this be a Cython version issue?


Alexander Taylor

unread,
Dec 7, 2019, 5:31:19 AM12/7/19
to Kivy users support
Buildozer won't download the p4a develop branch unless you set this in buildozer.spec

Your cython issue is that you don't have it installed for python 2.

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/eOW9BcsO4lQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

Horace Johnson

unread,
Dec 7, 2019, 5:53:55 AM12/7/19
to Kivy users support
Ok, then I'll just go with python3 since it's there as cython version 0.29.14.

What exactly should I type in the Spec's p4a target?

Exactly what SDK, NDKs, etc can I use and should I point Buildozer to those files in the Spec?

Horace Johnson

unread,
Dec 7, 2019, 7:58:06 AM12/7/19
to Kivy users support
~/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager "build-tools;29.0.0"

That gets build tools but how can I retrieve API Platform from sdkmanager?  Looks like I gotta download the 28 and 29 folders and manually add them to the .buildozer path.  Buildozer itself will not download 28 and 29.

Under android-sdk/platforms....  I have files in 27 (buildozer get those) but I do not having anything in 28 or 29.

Horace Johnson

unread,
Dec 7, 2019, 8:46:48 AM12/7/19
to Kivy users support
Another attempt here to get Buildozer to just build with API 27 using python3,kivy.
Cython is installed.  I did not have setuptools installed so I ran....

pip3  install --user  setuptools

And the results......


[INFO]:    setuptools apparently isn't already in site-packages
[INFO]:    Installing setuptools into site-packages
[INFO]:    -> directory context /home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools
[INFO]:    -> running python setup.py install -O2 --...(and 117 more)
Exception in thread background thread for pid 12579:                           
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 1540, in wrap
    fn(*args, **kwargs)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 2459, in background_thread
    handle_exit_code(exit_code)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 2157, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py install -O2 --root=/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/hmtsc --install-lib=.

  STDOUT:
Traceback (most recent call last):
  File "setup.py", line 11, in <module>
    import setuptools
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/__init__.py", line 20, in <module>
    from setuptools.dist import Distribution, Feature
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/dist.py", line 36, in <module>
    from setuptools import windows_support
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/windows_support.py", line 2, in <module>
    import ctypes
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'


  STDERR:


Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1192, in <module>
    main()
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 668, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 206, in build_dist_from_args
    args, "ignore_setup_py", False
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes
    recipe.build_arch(arch)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 844, in build_arch
    self.install_python_package(arch)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 863, in install_python_package
    _env=hpenv, *self.setup_extra_args)
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 180, in shprint
    for line in output:
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 863, in next
    self.wait()
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/kivy/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py install -O2 --root=/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/hmtsc --install-lib=.

  STDOUT:
Traceback (most recent call last):
  File "setup.py", line 11, in <module>
    import setuptools
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/__init__.py", line 20, in <module>
    from setuptools.dist import Distribution, Feature
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/dist.py", line 36, in <module>
    from setuptools import windows_support
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/windows_support.py", line 2, in <module>
    import ctypes
  File "/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'


  STDERR:

# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=hmtsc --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
#     CLUTTER_IM_MODULE = 'xim'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     XDG_MENU_PREFIX = 'gnome-'
#     LANG = 'en_US.UTF-8'
#     DISPLAY = ':0'
#     OLDPWD = '/home/kivy'
#     GNOME_SHELL_SESSION_MODE = 'ubuntu'
#     COLORTERM = 'truecolor'
#     USERNAME = 'kivy'
#     XDG_VTNR = '1'
#     SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
#     XDG_SESSION_ID = '1'
#     USER = 'kivy'
#     DESKTOP_SESSION = 'ubuntu'
#     QT4_IM_MODULE = 'xim'
#     TEXTDOMAINDIR = '/usr/share/locale/'
#     GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/c3968eec_7b3f_4ce9_86c2_68c28ecc3691'
#     PWD = '/home/kivy/Desktop/HMT'
#     HOME = '/home/kivy'
#     TEXTDOMAIN = 'im-config'
#     SSH_AGENT_PID = '1073'
#     QT_ACCESSIBILITY = '1'
#     XDG_SESSION_TYPE = 'x11'
#     XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop'
#     XDG_SESSION_DESKTOP = 'ubuntu'
#     GJS_DEBUG_OUTPUT = 'stderr'
#     GTK_MODULES = 'gail:atk-bridge'
#     WINDOWPATH = '1'
#     TERM = 'xterm-256color'
#     SHELL = '/bin/bash'
#     VTE_VERSION = '5202'
#     QT_IM_MODULE = 'xim'
#     XMODIFIERS = '@im=ibus'
#     IM_CONFIG_PHASE = '2'
#     XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'
#     GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'
#     GNOME_TERMINAL_SERVICE = ':1.151'
#     XDG_SEAT = 'seat0'
#     SHLVL = '1'
#     GDMSESSION = 'ubuntu'
#     GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
#     LOGNAME = 'kivy'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     XAUTHORITY = '/run/user/1000/gdm/Xauthority'
#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'
#     PATH = '/home/kivy/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/kivy/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/kivy/.local/bin/'
#     GJS_DEBUG_TOPICS = 'JS ERROR;JS LOG'
#     SESSION_MANAGER = 'local/kivy-VirtualBox:@/tmp/.ICE-unix/935,unix/kivy-VirtualBox:/tmp/.ICE-unix/935'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     GTK_IM_MODULE = 'ibus'
#     _ = '/home/kivy/.local/bin/buildozer'
#     PACKAGES_PATH = '/home/kivy/.buildozer/android/packages'
#     ANDROIDSDK = '/home/kivy/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/kivy/.buildozer/android/platform/android-ndk-r17c'
#     ANDROIDAPI = '27'
#     ANDROIDMINAPI = '21'
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
kivy@kivy-VirtualBox:~/Desktop/HMT$ 

Buildozer 0.40

Horace Johnson

unread,
Dec 7, 2019, 11:16:01 AM12/7/19
to Kivy users support
The four years I put into Kivy haven't been in vain just yet.  After getting no sleep and sweeping over the internet like a Buzzard on carcass, I fixed the last error.

I know I should be setting myself on fire and stop drop and roll right about now, but it's not over.

I have no idea why Buildozer will not download API 28 and API 29.  I'm wondering if I need to update repositories or something.....??

If there is a command line way I can do in manually using the sdkmanager, then someone, please tell.....  Help me save four years of "kiving."


Oh...the last error....

sudo apt-get install libffi-dev


That fixed the "Ctypes" error.


Yes...  I'm am making note of all fixes this time.

Robert Flatt

unread,
Dec 7, 2019, 12:17:09 PM12/7/19
to Kivy users support
Its hard to keep up with all the stuff that trips you up ;)

SDK 29:

1) buildozer.spec :
# (int) Target Android API, should be as high as possible.
#android.api = 27
android
.api = 29

2) Delete project/.buildozer 

3) Run buildozer

Horace Johnson

unread,
Dec 7, 2019, 12:32:49 PM12/7/19
to Kivy users support
Buildozer is not going to download 28 nor 29...that's what I been trying to convey.  It'll just raise an exception stating there's no APIs (or builds...i forgot) and then it says, the user has to install them manually.

That's why I was wonder if it was a repositories needing an update kind of thing and Buildozer just didn't have any URLs or no where to look.  IDK.

Haven't had sleep in almost 24 hours now...  Shame.  :(

Pablo Diaz

unread,
Dec 7, 2019, 12:38:21 PM12/7/19
to Kivy users support
I read taht you fixed ctypes error, now what's happening in terminal?

Horace Johnson

unread,
Dec 7, 2019, 1:06:28 PM12/7/19
to Kivy users support
# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,kivy



# change the major version of python used by the app
#osx.python_version = 3

# Kivy version to use
#osx.kivy_version = 1.11.1



# (int) Target Android API, should be as high as possible.
android.api = 29

# (int) Minimum API your APK will support.
android.minapi = 21

# (int) Android SDK version to use
android.sdk = 24

# (str) Android NDK version to use
android.ndk = 17c



MyProject> buildozer android debug




kivy@kivy-VirtualBox:~$ cd ~/Desktop/HMT
kivy@kivy-VirtualBox:~/Desktop/HMT$ buildozer android debug
# Check configuration tokens
# WARNING: Config token app android.sdk is deprecated and ignored, but you set value 24
# Ensure build layout
# Create directory /home/kivy/Desktop/HMT/.buildozer
# Create directory /home/kivy/Desktop/HMT/.buildozer/applibs
# Create directory /home/kivy/Desktop/HMT/.buildozer/android/platform
# Create directory /home/kivy/Desktop/HMT/.buildozer/android/app
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.19.0.5 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /home/kivy/.local/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Run 'git clone -b master --single-branch https://github.com/kivy/python-for-android.git python-for-android'
# Cwd /home/kivy/Desktop/HMT/.buildozer/android/platform
Cloning into 'python-for-android'...
# Run '/usr/bin/python3 -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\' \'pep517\' \'pytoml\' \'virtualenv\''
# Cwd None
# Apache ANT found at /home/kivy/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/kivy/.buildozer/android/platform/android-sdk
# Recommended android's NDK version by p4a is: 17c
# Android NDK found at /home/kivy/.buildozer/android/platform/android-ndk-r17c
# Installing/updating SDK platform tools if necessary
# Run '/home/kivy/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager tools platform-tools'
# Cwd /home/kivy/.buildozer/android/platform/android-sdk
Warning: File /home/kivy/.android/repositories.cfg could not be loaded.         
[=======================================] 100% Computing updates...             
# Run '/home/kivy/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager --update'
# Cwd /home/kivy/.buildozer/android/platform/android-sdk
Warning: File /home/kivy/.android/repositories.cfg could not be loaded.         
[=======================================] 100% Computing updates...             
# Updating SDK build tools if necessary
# Run '/home/kivy/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager --list'
# Cwd /home/kivy/.buildozer/android/platform/android-sdk
Warning: File /home/kivy/.android/repositories.cfg could not be loaded.         
Installed packages:=====================] 100% Computing updates...             
  Path                 | Version | Description                    | Location             
  -------              | ------- | -------                        | -------              
  build-tools;28.0.0   | 28.0.0  | Android SDK Build-Tools 28     | build-tools/28.0.0/  
  build-tools;28.0.2   | 28.0.2  | Android SDK Build-Tools 28.0.2 | build-tools/28.0.2/  
  build-tools;29.0.0   | 29.0.0  | Android SDK Build-Tools 29     | build-tools/29.0.0/  
  build-tools;29.0.1   | 29.0.1  | Android SDK Build-Tools 29.0.1 | build-tools/29.0.1/  
  build-tools;29.0.2   | 29.0.2  | Android SDK Build-Tools 29.0.2 | build-tools/29.0.2/  
  platform-tools       | 29.0.5  | Android SDK Platform-Tools     | platform-tools/      
  platforms;android-27 | 3       | Android SDK Platform 27        | platforms/android-27/
  tools                | 26.1.1  | Android SDK Tools 26.1.1       | tools/               

Available Packages:
  Path                                                                                     | Version      | Description                                                         
  -------                                                                                  | -------      | -------                                                             
  add-ons;addon-google_apis-google-15                                                      | 3            | Google APIs                                                         
  add-ons;addon-google_apis-google-16                                                      | 4            | Google APIs                                                         
  add-ons;addon-google_apis-google-17                                                      | 4            | Google APIs                                                         
  add-ons;addon-google_apis-google-18                                                      | 4            | Google APIs                                                         
  add-ons;addon-google_apis-google-19                                                      | 20           | Google APIs                                                         
  add-ons;addon-google_apis-google-21                                                      | 1            | Google APIs                                                         
  add-ons;addon-google_apis-google-22                                                      | 1            | Google APIs                                                         
  add-ons;addon-google_apis-google-23                                                      | 1            | Google APIs                                                         
  add-ons;addon-google_apis-google-24                                                      | 1            | Google APIs                                                         
  add-ons;addon-google_gdk-google-19                                                       | 11           | Glass Development Kit Preview                                       
  build-tools;19.1.0                                                                       | 19.1.0       | Android SDK Build-Tools 19.1                                        
  build-tools;20.0.0                                                                       | 20.0.0       | Android SDK Build-Tools 20                                          
  build-tools;21.1.2                                                                       | 21.1.2       | Android SDK Build-Tools 21.1.2                                      
  build-tools;22.0.1                                                                       | 22.0.1       | Android SDK Build-Tools 22.0.1                                      
  build-tools;23.0.1                                                                       | 23.0.1       | Android SDK Build-Tools 23.0.1                                      
  build-tools;23.0.2                                                                       | 23.0.2       | Android SDK Build-Tools 23.0.2                                      
  build-tools;23.0.3                                                                       | 23.0.3       | Android SDK Build-Tools 23.0.3                                      
  build-tools;24.0.0                                                                       | 24.0.0       | Android SDK Build-Tools 24                                          
  build-tools;24.0.1                                                                       | 24.0.1       | Android SDK Build-Tools 24.0.1                                      
  build-tools;24.0.2                                                                       | 24.0.2       | Android SDK Build-Tools 24.0.2                                      
  build-tools;24.0.3                                                                       | 24.0.3       | Android SDK Build-Tools 24.0.3                                      
  build-tools;25.0.0                                                                       | 25.0.0       | Android SDK Build-Tools 25                                          
  build-tools;25.0.1                                                                       | 25.0.1       | Android SDK Build-Tools 25.0.1                                      
  build-tools;25.0.2                                                                       | 25.0.2       | Android SDK Build-Tools 25.0.2                                      
  build-tools;25.0.3                                                                       | 25.0.3       | Android SDK Build-Tools 25.0.3                                      
  build-tools;26.0.0                                                                       | 26.0.0       | Android SDK Build-Tools 26                                          
  build-tools;26.0.1                                                                       | 26.0.1       | Android SDK Build-Tools 26.0.1                                      
  build-tools;26.0.2                                                                       | 26.0.2       | Android SDK Build-Tools 26.0.2                                      
  build-tools;26.0.3                                                                       | 26.0.3       | Android SDK Build-Tools 26.0.3                                      
  build-tools;27.0.0                                                                       | 27.0.0       | Android SDK Build-Tools 27                                          
  build-tools;27.0.1                                                                       | 27.0.1       | Android SDK Build-Tools 27.0.1                                      
  build-tools;27.0.2                                                                       | 27.0.2       | Android SDK Build-Tools 27.0.2                                      
  build-tools;27.0.3                                                                       | 27.0.3       | Android SDK Build-Tools 27.0.3                                      
  build-tools;28.0.0                                                                       | 28.0.0       | Android SDK Build-Tools 28                                          
  build-tools;28.0.1                                                                       | 28.0.1       | Android SDK Build-Tools 28.0.1                                      
  build-tools;28.0.2                                                                       | 28.0.2       | Android SDK Build-Tools 28.0.2                                      
  build-tools;28.0.3                                                                       | 28.0.3       | Android SDK Build-Tools 28.0.3                                      
  build-tools;29.0.0                                                                       | 29.0.0       | Android SDK Build-Tools 29                                          
  build-tools;29.0.1                                                                       | 29.0.1       | Android SDK Build-Tools 29.0.1                                      
  build-tools;29.0.2                                                                       | 29.0.2       | Android SDK Build-Tools 29.0.2                                      
  cmake;3.10.2.4988404                                                                     | 3.10.2       | CMake 3.10.2.4988404                                                
  cmake;3.6.4111459                                                                        | 3.6.4111459  | CMake 3.6.4111459                                                   
  docs                                                                                     | 1            | Documentation for Android SDK                                       
  emulator                                                                                 | 29.2.11      | Android Emulator                                                    
  extras;android;gapid;1                                                                   | 1.0.3        | GPU Debugging tools                                                 
  extras;android;gapid;3                                                                   | 3.1.0        | GPU Debugging tools                                                 
  extras;android;m2repository                                                              | 47.0.0       | Android Support Repository                                          
  extras;google;auto                                                                       | 1.1          | Android Auto Desktop Head Unit emulator                             
  extras;google;google_play_services                                                       | 49           | Google Play services                                                
  extras;google;instantapps                                                                | 1.9.0        | Google Play Instant Development SDK                                 
  extras;google;m2repository                                                               | 58           | Google Repository                                                   
  extras;google;market_apk_expansion                                                       | 1            | Google Play APK Expansion library                                   
  extras;google;market_licensing                                                           | 1            | Google Play Licensing Library                                       
  extras;google;simulators                                                                 | 1            | Android Auto API Simulators                                         
  extras;google;webdriver                                                                  | 2            | Google Web Driver                                                   
  extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0        | 1            | Solver for ConstraintLayout 1.0.0                                   
  extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-alpha4 | 1            | com.android.support.constraint:constraint-layout-solver:1.0.0-alpha4
  extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-alpha8 | 1            | Solver for ConstraintLayout 1.0.0-alpha8                            
  extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta1  | 1            | Solver for ConstraintLayout 1.0.0-beta1                             
  extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta2  | 1            | Solver for ConstraintLayout 1.0.0-beta2                             
  extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta3  | 1            | Solver for ConstraintLayout 1.0.0-beta3                             
  extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta4  | 1            | Solver for ConstraintLayout 1.0.0-beta4                             
  extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta5  | 1            | Solver for ConstraintLayout 1.0.0-beta5                             
  extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.1        | 1            | Solver for ConstraintLayout 1.0.1                                   
  extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2        | 1            | Solver for ConstraintLayout 1.0.2                                   
  extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0               | 1            | ConstraintLayout for Android 1.0.0                                  
  extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-alpha4        | 1            | com.android.support.constraint:constraint-layout:1.0.0-alpha4       
  extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-alpha8        | 1            | ConstraintLayout for Android 1.0.0-alpha8                           
  extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta1         | 1            | ConstraintLayout for Android 1.0.0-beta1                            
  extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta2         | 1            | ConstraintLayout for Android 1.0.0-beta2                            
  extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta3         | 1            | ConstraintLayout for Android 1.0.0-beta3                            
  extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta4         | 1            | ConstraintLayout for Android 1.0.0-beta4                            
  extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta5         | 1            | ConstraintLayout for Android 1.0.0-beta5                            
  extras;m2repository;com;android;support;constraint;constraint-layout;1.0.1               | 1            | ConstraintLayout for Android 1.0.1                                  
  extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2               | 1            | ConstraintLayout for Android 1.0.2                                  
  lldb;2.0                                                                                 | 2.0.2558144  | LLDB 2.0                                                            
  lldb;2.1                                                                                 | 2.1.2852477  | LLDB 2.1                                                            
  lldb;2.2                                                                                 | 2.2.3271982  | LLDB 2.2                                                            
  lldb;2.3                                                                                 | 2.3.3614996  | LLDB 2.3                                                            
  lldb;3.0                                                                                 | 3.0.4213617  | LLDB 3.0                                                            
  lldb;3.1                                                                                 | 3.1.4508709  | LLDB 3.1                                                            
  ndk-bundle                                                                               | 20.1.5948944 | NDK                                                                 
  ndk;16.1.4479499                                                                         | 16.1.4479499 | NDK (Side by side) 16.1.4479499                                     
  ndk;17.2.4988734                                                                         | 17.2.4988734 | NDK (Side by side) 17.2.4988734                                     
  ndk;18.1.5063045                                                                         | 18.1.5063045 | NDK (Side by side) 18.1.5063045                                     
  ndk;19.2.5345600                                                                         | 19.2.5345600 | NDK (Side by side) 19.2.5345600                                     
  ndk;20.0.5594570                                                                         | 20.0.5594570 | NDK (Side by side) 20.0.5594570                                     
  ndk;20.1.5948944                                                                         | 20.1.5948944 | NDK (Side by side) 20.1.5948944                                     
  patcher;v4                                                                               | 1            | SDK Patch Applier v4                                                
  platform-tools                                                                           | 29.0.5       | Android SDK Platform-Tools                                          
  platforms;android-10                                                                     | 2            | Android SDK Platform 10                                             
  platforms;android-11                                                                     | 2            | Android SDK Platform 11                                             
  platforms;android-12                                                                     | 3            | Android SDK Platform 12                                             
  platforms;android-13                                                                     | 1            | Android SDK Platform 13                                             
  platforms;android-14                                                                     | 4            | Android SDK Platform 14                                             
  platforms;android-15                                                                     | 5            | Android SDK Platform 15                                             
  platforms;android-16                                                                     | 5            | Android SDK Platform 16                                             
  platforms;android-17                                                                     | 3            | Android SDK Platform 17                                             
  platforms;android-18                                                                     | 3            | Android SDK Platform 18                                             
  platforms;android-19                                                                     | 4            | Android SDK Platform 19                                             
  platforms;android-20                                                                     | 2            | Android SDK Platform 20                                             
  platforms;android-21                                                                     | 2            | Android SDK Platform 21                                             
  platforms;android-22                                                                     | 2            | Android SDK Platform 22                                             
  platforms;android-23                                                                     | 3            | Android SDK Platform 23                                             
  platforms;android-24                                                                     | 2            | Android SDK Platform 24                                             
  platforms;android-25                                                                     | 3            | Android SDK Platform 25                                             
  platforms;android-26                                                                     | 2            | Android SDK Platform 26                                             
  platforms;android-27                                                                     | 3            | Android SDK Platform 27                                             
  platforms;android-28                                                                     | 6            | Android SDK Platform 28                                             
  platforms;android-29                                                                     | 4            | Android SDK Platform 29                                             
  platforms;android-7                                                                      | 3            | Android SDK Platform 7                                              
  platforms;android-8                                                                      | 3            | Android SDK Platform 8                                              
  platforms;android-9                                                                      | 2            | Android SDK Platform 9                                              
  sources;android-15                                                                       | 2            | Sources for Android 15                                              
  sources;android-16                                                                       | 2            | Sources for Android 16                                              
  sources;android-17                                                                       | 1            | Sources for Android 17                                              
  sources;android-18                                                                       | 1            | Sources for Android 18                                              
  sources;android-19                                                                       | 2            | Sources for Android 19                                              
  sources;android-20                                                                       | 1            | Sources for Android 20                                              
  sources;android-21                                                                       | 1            | Sources for Android 21                                              
  sources;android-22                                                                       | 1            | Sources for Android 22                                              
  sources;android-23                                                                       | 1            | Sources for Android 23                                              
  sources;android-24                                                                       | 1            | Sources for Android 24                                              
  sources;android-25                                                                       | 1            | Sources for Android 25                                              
  sources;android-26                                                                       | 1            | Sources for Android 26                                              
  sources;android-27                                                                       | 1            | Sources for Android 27                                              
  sources;android-28                                                                       | 1            | Sources for Android 28                                              
  sources;android-29                                                                       | 1            | Sources for Android 29                                              
  system-images;android-10;default;armeabi-v7a                                             | 5            | ARM EABI v7a System Image                                           
  system-images;android-10;default;x86                                                     | 5            | Intel x86 Atom System Image                                         
  system-images;android-10;google_apis;armeabi-v7a                                         | 6            | Google APIs ARM EABI v7a System Image                               
  system-images;android-10;google_apis;x86                                                 | 6            | Google APIs Intel x86 Atom System Image                             
  system-images;android-14;default;armeabi-v7a                                             | 2            | ARM EABI v7a System Image                                           
  system-images;android-15;default;armeabi-v7a                                             | 5            | ARM EABI v7a System Image                                           
  system-images;android-15;default;x86                                                     | 5            | Intel x86 Atom System Image                                         
  system-images;android-15;google_apis;armeabi-v7a                                         | 6            | Google APIs ARM EABI v7a System Image                               
  system-images;android-15;google_apis;x86                                                 | 6            | Google APIs Intel x86 Atom System Image                             
  system-images;android-16;default;armeabi-v7a                                             | 6            | ARM EABI v7a System Image                                           
  system-images;android-16;default;mips                                                    | 1            | MIPS System Image                                                   
  system-images;android-16;default;x86                                                     | 6            | Intel x86 Atom System Image                                         
  system-images;android-16;google_apis;armeabi-v7a                                         | 6            | Google APIs ARM EABI v7a System Image                               
  system-images;android-16;google_apis;x86                                                 | 6            | Google APIs Intel x86 Atom System Image                             
  system-images;android-17;default;armeabi-v7a                                             | 6            | ARM EABI v7a System Image                                           
  system-images;android-17;default;mips                                                    | 1            | MIPS System Image                                                   
  system-images;android-17;default;x86                                                     | 4            | Intel x86 Atom System Image                                         
  system-images;android-17;google_apis;armeabi-v7a                                         | 6            | Google APIs ARM EABI v7a System Image                               
  system-images;android-17;google_apis;x86                                                 | 6            | Google APIs Intel x86 Atom System Image                             
  system-images;android-18;default;armeabi-v7a                                             | 5            | ARM EABI v7a System Image                                           
  system-images;android-18;default;x86                                                     | 4            | Intel x86 Atom System Image                                         
  system-images;android-18;google_apis;armeabi-v7a                                         | 6            | Google APIs ARM EABI v7a System Image                               
  system-images;android-18;google_apis;x86                                                 | 6            | Google APIs Intel x86 Atom System Image                             
  system-images;android-19;default;armeabi-v7a                                             | 5            | ARM EABI v7a System Image                                           
  system-images;android-19;default;x86                                                     | 6            | Intel x86 Atom System Image                                         
  system-images;android-19;google_apis;armeabi-v7a                                         | 38           | Google APIs ARM EABI v7a System Image                               
  system-images;android-19;google_apis;x86                                                 | 38           | Google APIs Intel x86 Atom System Image                             
  system-images;android-21;android-tv;armeabi-v7a                                          | 3            | Android TV ARM EABI v7a System Image                                
  system-images;android-21;android-tv;x86                                                  | 3            | Android TV Intel x86 Atom System Image                              
  system-images;android-21;default;armeabi-v7a                                             | 4            | ARM EABI v7a System Image                                           
  system-images;android-21;default;x86                                                     | 5            | Intel x86 Atom System Image                                         
  system-images;android-21;default;x86_64                                                  | 5            | Intel x86 Atom_64 System Image                                      
  system-images;android-21;google_apis;armeabi-v7a                                         | 30           | Google APIs ARM EABI v7a System Image                               
  system-images;android-21;google_apis;x86                                                 | 30           | Google APIs Intel x86 Atom System Image                             
  system-images;android-21;google_apis;x86_64                                              | 30           | Google APIs Intel x86 Atom_64 System Image                          
  system-images;android-22;android-tv;x86                                                  | 3            | Android TV Intel x86 Atom System Image                              
  system-images;android-22;default;armeabi-v7a                                             | 2            | ARM EABI v7a System Image                                           
  system-images;android-22;default;x86                                                     | 6            | Intel x86 Atom System Image                                         
  system-images;android-22;default;x86_64                                                  | 6            | Intel x86 Atom_64 System Image                                      
  system-images;android-22;google_apis;armeabi-v7a                                         | 24           | Google APIs ARM EABI v7a System Image                               
  system-images;android-22;google_apis;x86                                                 | 24           | Google APIs Intel x86 Atom System Image                             
  system-images;android-22;google_apis;x86_64                                              | 24           | Google APIs Intel x86 Atom_64 System Image                          
  system-images;android-23;android-tv;armeabi-v7a                                          | 12           | Android TV ARM EABI v7a System Image                                
  system-images;android-23;android-tv;x86                                                  | 19           | Android TV Intel x86 Atom System Image                              
  system-images;android-23;android-wear;armeabi-v7a                                        | 6            | Android Wear ARM EABI v7a System Image                              
  system-images;android-23;android-wear;x86                                                | 6            | Android Wear Intel x86 Atom System Image                            
  system-images;android-23;default;armeabi-v7a                                             | 6            | ARM EABI v7a System Image                                           
  system-images;android-23;default;x86                                                     | 10           | Intel x86 Atom System Image                                         
  system-images;android-23;default;x86_64                                                  | 10           | Intel x86 Atom_64 System Image                                      
  system-images;android-23;google_apis;armeabi-v7a                                         | 31           | Google APIs ARM EABI v7a System Image                               
  system-images;android-23;google_apis;x86                                                 | 31           | Google APIs Intel x86 Atom System Image                             
  system-images;android-23;google_apis;x86_64                                              | 31           | Google APIs Intel x86 Atom_64 System Image                          
  system-images;android-24;android-tv;x86                                                  | 20           | Android TV Intel x86 Atom System Image                              
  system-images;android-24;default;arm64-v8a                                               | 7            | ARM 64 v8a System Image                                             
  system-images;android-24;default;armeabi-v7a                                             | 7            | ARM EABI v7a System Image                                           
  system-images;android-24;default;x86                                                     | 8            | Intel x86 Atom System Image                                         
  system-images;android-24;default;x86_64                                                  | 8            | Intel x86 Atom_64 System Image                                      
  system-images;android-24;google_apis;arm64-v8a                                           | 25           | Google APIs ARM 64 v8a System Image                                 
  system-images;android-24;google_apis;armeabi-v7a                                         | 25           | Google APIs ARM EABI v7a System Image                               
  system-images;android-24;google_apis;x86                                                 | 25           | Google APIs Intel x86 Atom System Image                             
  system-images;android-24;google_apis;x86_64                                              | 25           | Google APIs Intel x86 Atom_64 System Image                          
  system-images;android-24;google_apis_playstore;x86                                       | 19           | Google Play Intel x86 Atom System Image                             
  system-images;android-25;android-tv;x86                                                  | 14           | Android TV Intel x86 Atom System Image                              
  system-images;android-25;android-wear-cn;armeabi-v7a                                     | 4            | China version of Android Wear ARM EABI v7a System Image             
  system-images;android-25;android-wear-cn;x86                                             | 4            | China version of Android Wear Intel x86 Atom System Image           
  system-images;android-25;android-wear;armeabi-v7a                                        | 3            | Android Wear ARM EABI v7a System Image                              
  system-images;android-25;android-wear;x86                                                | 3            | Android Wear Intel x86 Atom System Image                            
  system-images;android-25;default;x86                                                     | 1            | Intel x86 Atom System Image                                         
  system-images;android-25;default;x86_64                                                  | 1            | Intel x86 Atom_64 System Image                                      
  system-images;android-25;google_apis;arm64-v8a                                           | 16           | Google APIs ARM 64 v8a System Image                                 
  system-images;android-25;google_apis;armeabi-v7a                                         | 16           | Google APIs ARM EABI v7a System Image                               
  system-images;android-25;google_apis;x86                                                 | 16           | Google APIs Intel x86 Atom System Image                             
  system-images;android-25;google_apis;x86_64                                              | 16           | Google APIs Intel x86 Atom_64 System Image                          
  system-images;android-25;google_apis_playstore;x86                                       | 9            | Google Play Intel x86 Atom System Image                             
  system-images;android-26;android-tv;x86                                                  | 12           | Android TV Intel x86 Atom System Image                              
  system-images;android-26;android-wear-cn;x86                                             | 4            | China version of Android Wear Intel x86 Atom System Image           
  system-images;android-26;android-wear;x86                                                | 4            | Android Wear Intel x86 Atom System Image                            
  system-images;android-26;default;x86                                                     | 1            | Intel x86 Atom System Image                                         
  system-images;android-26;default;x86_64                                                  | 1            | Intel x86 Atom_64 System Image                                      
  system-images;android-26;google_apis;x86                                                 | 14           | Google APIs Intel x86 Atom System Image                             
  system-images;android-26;google_apis;x86_64                                              | 14           | Google APIs Intel x86 Atom_64 System Image                          
  system-images;android-26;google_apis_playstore;x86                                       | 7            | Google Play Intel x86 Atom System Image                             
  system-images;android-27;android-tv;x86                                                  | 7            | Android TV Intel x86 Atom System Image                              
  system-images;android-27;default;x86                                                     | 1            | Intel x86 Atom System Image                                         
  system-images;android-27;default;x86_64                                                  | 1            | Intel x86 Atom_64 System Image                                      
  system-images;android-27;google_apis;x86                                                 | 9            | Google APIs Intel x86 Atom System Image                             
  system-images;android-27;google_apis_playstore;x86                                       | 3            | Google Play Intel x86 Atom System Image                             
  system-images;android-28;android-tv;x86                                                  | 8            | Android TV Intel x86 Atom System Image                              
  system-images;android-28;android-wear-cn;x86                                             | 3            | China version of Wear OS Intel x86 Atom System Image                
  system-images;android-28;android-wear;x86                                                | 3            | Wear OS Intel x86 Atom System Image                                 
  system-images;android-28;default;x86                                                     | 4            | Intel x86 Atom System Image                                         
  system-images;android-28;default;x86_64                                                  | 4            | Intel x86 Atom_64 System Image                                      
  system-images;android-28;google_apis;x86                                                 | 10           | Google APIs Intel x86 Atom System Image                             
  system-images;android-28;google_apis;x86_64                                              | 9            | Google APIs Intel x86 Atom_64 System Image                          
  system-images;android-28;google_apis_playstore;x86                                       | 9            | Google Play Intel x86 Atom System Image                             
  system-images;android-28;google_apis_playstore;x86_64                                    | 8            | Google Play Intel x86 Atom_64 System Image                          
  system-images;android-29;default;x86                                                     | 7            | Intel x86 Atom System Image                                         
  system-images;android-29;default;x86_64                                                  | 7            | Intel x86 Atom_64 System Image                                      
  system-images;android-29;google_apis;x86                                                 | 9            | Google APIs Intel x86 Atom System Image                             
  system-images;android-29;google_apis;x86_64                                              | 9            | Google APIs Intel x86 Atom_64 System Image                          
  system-images;android-29;google_apis_playstore;x86                                       | 8            | Google Play Intel x86 Atom System Image                             
  system-images;android-29;google_apis_playstore;x86_64                                    | 8            | Google Play Intel x86 Atom_64 System Image                          
  system-images;android-Q;android-tv;x86                                                   | 1            | Android TV Intel x86 Atom System Image                              
  tools                                                                                    | 26.1.1       | Android SDK Tools                                                   

# Check that aidl can be executed
# Search for Aidl
# Run '/home/kivy/.buildozer/android/platform/android-sdk/build-tools/29.0.2/aidl'
# Cwd None
# Downloading platform api target if necessary
# Android packages installation done.
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=hmtsc --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21'
# Cwd /home/kivy/Desktop/HMT/.buildozer/android/platform/python-for-android
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI: 29
[INFO]:    Available Android APIs are (27)
[ERROR]:   Build failed: Requested API target 29 is not available, install it with the SDK android tool.
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=hmtsc --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/Desktop/HMT/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
#     CLUTTER_IM_MODULE = 'xim'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     XDG_MENU_PREFIX = 'gnome-'
#     LANG = 'en_US.UTF-8'
#     DISPLAY = ':0'
#     OLDPWD = '/home/kivy'
#     GNOME_SHELL_SESSION_MODE = 'ubuntu'
#     COLORTERM = 'truecolor'
#     USERNAME = 'kivy'
#     XDG_VTNR = '1'
#     SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
#     XDG_SESSION_ID = '1'
#     USER = 'kivy'
#     DESKTOP_SESSION = 'ubuntu'
#     QT4_IM_MODULE = 'xim'
#     TEXTDOMAINDIR = '/usr/share/locale/'
#     GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/85cd382b_8a5b_49c5_b917_b111ddc2cad4'
#     PWD = '/home/kivy/Desktop/HMT'
#     HOME = '/home/kivy'
#     TEXTDOMAIN = 'im-config'
#     SSH_AGENT_PID = '1118'
#     QT_ACCESSIBILITY = '1'
#     XDG_SESSION_TYPE = 'x11'
#     XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop'
#     XDG_SESSION_DESKTOP = 'ubuntu'
#     GJS_DEBUG_OUTPUT = 'stderr'
#     GTK_MODULES = 'gail:atk-bridge'
#     WINDOWPATH = '1'
#     TERM = 'xterm-256color'
#     SHELL = '/bin/bash'
#     VTE_VERSION = '5202'
#     QT_IM_MODULE = 'xim'
#     XMODIFIERS = '@im=ibus'
#     IM_CONFIG_PHASE = '2'
#     XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'
#     GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'
#     GNOME_TERMINAL_SERVICE = ':1.61'
#     XDG_SEAT = 'seat0'
#     SHLVL = '1'
#     GDMSESSION = 'ubuntu'
#     GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
#     LOGNAME = 'kivy'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     XAUTHORITY = '/run/user/1000/gdm/Xauthority'
#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'
#     PATH = '/home/kivy/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/kivy/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/kivy/.local/bin/'
#     GJS_DEBUG_TOPICS = 'JS ERROR;JS LOG'
#     SESSION_MANAGER = 'local/kivy-VirtualBox:@/tmp/.ICE-unix/980,unix/kivy-VirtualBox:/tmp/.ICE-unix/980'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     GTK_IM_MODULE = 'ibus'
#     _ = '/home/kivy/.local/bin/buildozer'
#     PACKAGES_PATH = '/home/kivy/.buildozer/android/packages'
#     ANDROIDSDK = '/home/kivy/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/kivy/.buildozer/android/platform/android-ndk-r17c'
#     ANDROIDAPI = '29'

Horace Johnson

unread,
Dec 7, 2019, 1:14:05 PM12/7/19
to Kivy users support

Robert Flatt

unread,
Dec 7, 2019, 9:46:47 PM12/7/19
to Kivy users support
This is the legacy of something (its almost always the baggage that slows us down), so lets reset a little

1) delete project/.buildozer
2) delete ~/.buildozer.
3) rename (NOT copy) buildozer.spec  (keeping for reference not for use)
4) run buildozer init
5) make one change to the new buildozer.spec :  add    android.api = 29  and log_level = 2  CHANGE NOTHING ELSE
6)run buildozer android debug

If that works, change the title, package name etc, add any project requirements
delete project/.buildozer 
LEAVE ALL THE OTHER VERSION NUMBERS AT IMPLICIT DEFAULT

Horace Johnson

unread,
Dec 8, 2019, 4:33:57 AM12/8/19
to Kivy users support
Man I wonder if I have nine lives like a cat.  Buildzoer is constantly trying to burry me after four years of "kiving" but twice now I have manage to survive it.  I don't know if I can pull it off a third time.

What I did was go with my intuition.  Buildozer was clearly showing me only api27 was available, so if that's the case, I just had to add api28 and api29 manually.  After a day of being raped by Buildozer, I finally came across what I needed and that was just simply the commands to run with the sdkmanager.

sdkmanager "platforms;android-28"


So I manually installed 28 and 29, deleted the .buildozer project folder, set api29 in the spec and left my fate of up "ones and zeros".....  and the DEVS.

The api29 build was successful!

Am I happy now?  Nope!

I can't relax until I know it'll be accepted by the Google Console but at least I can get some more rest knowing I'm just a peg leg away from lustful "happy go lucky."

Oh yeah...  When Buildozer downloads google stuff, the downloads tend to break a lot so I manually downloaded the NDKs for 20 and 21.  Hell, I probably did more downloading than Buildozer.

Now I just have to prepare my python 3.5 / kivy 1.11.1 converted project for the android....basically setting my path constructor back to system based root folder instead of direct path.

I really wish the DEVS would consider going back to the portable kivy for windows (kivy runs right out of folder with .bat).  That's a much better and easer run of kivy.

Is there a link to where the DEVS post all up coming changes to Buildozer?  I need to know if there is because I have to apparently keep up with its changes and updates or Buildzoer is going to have my a$# one of these days and there's no coming back from that.



What I did to get Buildozer running on Windows 7 64 AMD VirtualBox - Linux Ubuntu 18.04 64
 
sudo apt-get update

sudo apt-get python3 python3-pip  ## you don't need python3 if it's already installed, just the pip3

sudo apt-get install -y git zip unzip openjdk-8-jdk autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake


pip3 install --user --upgrade cython virtualenv

export PATH=$PATH:~/.local/bin/   ## add the following line at the end of your ~/.bashrc file


##-----option: might have to download some build tools versions like this-------------
~/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager "build-tools;29.0.0"
##-------------------------------------
sudo apt-get install libffi-dev ## this clears up some ctype arrors

NOTE: after installing buildozer, run buildozer init to get the new spec file.  If the new spec file is
 different, use the new because the old will raise an error!!!


NOTE: if kivy does not install your target API, you might have to add it manually using sdkmanager
E.g.    .../sdkmanager "platforms;android-29"


NOTE: delete the .buildozer folder inside your project folder.  Make sure you spec file is set to target everything correctly and then run....   buildozer android (debug or release)

NOTE: do NOT use sudo with pip3 and always use the --user with pip3 unless you're doing that venv thing, which I did not.

NOTE: never use sudo with buildozer commands because it will blowup your machine!!



"Deadly Kiving!"  :D


If all goes well...I might be dropping a "phat" donation to the kivy cause.  .....  Will see.

ZenCODE

unread,
Dec 11, 2019, 3:09:11 PM12/11/19
to Kivy users support
Lol. Yup, buildozer is not for the feint-of-heart. Well done on pushing through...:-)

Re: the Windows installer. Have you tried https://github.com/KeyWeeUsr/KivyInstaller? I have not tried it recently, but it used to work like charm on Windows...
Reply all
Reply to author
Forward
0 new messages