Trying to run Kivy with buildozer on Ubuntu 16.04, (startup-demo-project pong) I get an error on command
buildozer android debug deploy
After: .... [DEBUG]: BUILD SUCCESSFUL ....
at the end of the build there is an error message:
....
IOError: [Errno 2] No such file or directory: u'/home/std/Dokumente/python
/Kivy/.buildozer/android/platform/build/dists/myapp/build/outputs
/apk/myapp-debug.apk'
My installation is according to: http://buildozer.readthedocs.io/en/latest/installation.html for Ubuntu 16.04.
Also buildozer serve does not show anything useful, only:
Directory listing for /
as response to call:
http://localhost:8000
Buildozer console says:
192.168.178.22 - - [15/Apr/2018 21:43:12] "GET / HTTP/1.1" 200 -
192.168.178.22 - - [15/Apr/2018 21:43:12] code 404, message File not found
Annotation: I changed the log_level = 2 for more information, but could not figure out where to find the relevant log file or where to get more information about the error.
Problem
Solution
Use sudo to change and recompile android.py for Python 2.7. Please do the following at terminal window:
Step 1
Change directory
Step 2
Make backup copies of android.py and android.pyc
Step 3
Use an editor to make changes to android.py
Step 4
Insert the following import before
import sys
Step 5
Add the following codes after line 791 (
# XXX found how the apk name is really built from the title
). Note: __sdk_dir (double underscore). Please refer to print screens below for details.Step 6
Save the changes.
Step 7
Compile android.py
At shell prompt
or invoke Python Interpreter Interactive Shell
Step 8
At your project folder, run
Pictures
Changes Part 1 - from distutils.version import LooseVersion
Changes Part 2
Compile android.py
After Changes @ local Buildozer - App deployed to Acer Android tablet
After Changes @ Buildozer VM - Successful APK
Before Changes @ local Buildozer - IOError: [Errno 2] No such file or directory
Before Changes @ Buildozer VM - IOError: [Errno 2] No such file or directory