-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kivy / Python-for-android : Build.py fails to build an android package apk #33
Comments
Hi, Did you do: export PATH=$PATH:/home/USER/android-sdk-linux/tools/ (by You need to stick to android-8 or -14, that the only one tested with the Mathieu On 21/04/2012 07:33, socratesx wrote:
|
I have these exports in my .bashrc. You think they are wrong? export PATH=${PATH}:~/android-sdk-linux/tools export PATH=${PATH}:~/android-sdk-linux/platform-tools As for the android-8 or android-14, If I run id: 1 or "android-15" ABIs : armeabi-v7aid: 2 or "Google Inc.:Google APIs:15" Only two ids, and that's why I selected 2. Furthermore I tried to update manually the android by typing the same command that I see in the build.py: android update project -p . -t android-8 I got the same error with both android8 and 14 , but not with 2. |
Replace ~ with the FULL path /home/USERNAME as i said before. Android API number refer to the number next to android-APINUMBER. It's And then, you need to install the support for 8 or 14. Just launch I'll try to include screenshots in the documentation. Mathieu On 21/04/2012 11:12, socratesx wrote:
|
From the SDK manager I have only installed android 4.0.3 (API 15). I will download also the ones you said and I will report later for the result. Thanx! |
As for now API 15 won't work, as said in issue #9. So just download 14 and it should run smoothly. |
I downloaded API 14 but unfortunately it doesn't work... When I run the command sudo ./build.py --dir mount_point/kivy --package org.testapp.myapp --name "myapp" --version 1.0 debug installd I get: Traceback (most recent call last): I have removed the try,except statement for troubleshooting purposes. I also tried to run the update command manually. android update project -p . -t android-14 This is what I get: Updated project.properties Updated local.propertiesbuild.xml: Failed to find version-tag string. File must be updated. to prevent file from being rewritten automatically by the SDK tools.Updated file ./proguard-project.txt These are also my exports in .bashrc file: export PATH=${PATH}:/home/socratesx/android-sdk-linux/platform-tools |
Have you rebuilt the distribution after having downloaded API 14 and set it in the env variable? |
No. I will do it now and let you know. |
The result is the same after rebuilding distribution. Maybe I have to remove api 15 from the sdk manager and keep only 14 or it doesn't matter. |
Ok I did it but I had to change the build.py a little bit. So I replaced the subprocess.call() commands (for android update and ant calling) with os.popen() with the same arguments. The ant call had a problem though and so I called it manually by typing ant installd. After that the app installed in my device. |
That's weird. I don't understand why subprocess.call would act differently than os.popen()... because subprocess use os.popen... |
No more update, closing |
Has this fix been integrated? I think I am seeing this issue here. Will check more and look into code if I find nothing else. |
@nmz787 This issue is extremely old, python-for-android has been almost completely rewritten since then. If you have a problem, post on the kivy mailing list or open a new issue with the full details. |
I had an failure notice similar to the original one ...
.buildozer/android/platform/build/dists It just never got moved to /bin |
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.
The text was updated successfully, but these errors were encountered: