P0P3YE / python-for-android

Automatically exported from code.google.com/p/python-for-android
Apache License 2.0
0 stars 0 forks source link

Kivy / Python-for-android : Build.py fails to build an android package apk #46

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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 <module>
    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 really don't know what else to do.
My OS is Ubuntu 11.10.
Thanks!

Original issue reported on code.google.com by Socrat...@gmail.com on 20 Apr 2012 at 4:40

GoogleCodeExporter commented 8 years ago
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.

Original comment by Socrat...@gmail.com on 20 Apr 2012 at 6:11

GoogleCodeExporter commented 8 years ago
Wrong project.  Kivy is here: https://github.com/kivy/python-for-android

Original comment by brian.le...@gmail.com on 21 Apr 2012 at 1:32