-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
I try for many days to build a simple android package using kivy and python for android. Unfortunately, I've spent many hours trying to solve all the issues but I still cannot do it. I hope you guys help me out because you are my last hope before throwing my laptop off the window...
I have succeeded to build the distribution directory using only the kivy module.So the output folder /dist/default has all the necessary files (I hope) in order to build my apk. The command that I use to build the apk, according to the example in the docs is the following:
sudo ./build.py --dir ~/mount_point/kivy --name "Myapp" --package org.mytest.myapp --version 1.0 installd
What I get is:
An error occured while calling ~/android-sdk-linux/tools/android update Your PATH must include android tools.
I have already inserted in the bashrc the appropriate exports. So if i run the following:
~/android-sdk-linux/tools/android update
I get:
Error: Missing object name for verb 'update'. [Continues with usage details...]
I tried to remove from build.py the try except statement around the subprocess.call(...) and I ran gain the command. I got this :
Traceback (most recent call last):
File "./build.py", line 345, in
make_package(args)
File "./build.py", line 252, in make_package
subprocess.call([ANDROID, 'update', 'project', '-p', '.', '-t', android_api])
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(_popenargs, *_kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I replaced all subprocess.call() commands with os.popen() with the same arguments and it seems that I got a little further. However now when I run the build command I get the following error:
...
...
...
BUILD FAILED
/home/socratesx/android-sdk-linux/tools/ant/build.xml:1194: The following error occurred while executing this line:
/home/socratesx/android-sdk-linux/tools/ant/build.xml:1240: File /home/socratesx/python-for-android/dist/default/bin/Myapp-1.0-debug.apk does not exist.
I forgot to mention that I replaced also the android_api variable with the number 2 instead of 8.