Having trouble with basic Android APK compilation of Kivy example

30 views
Skip to first unread message

Matthew Buckley

unread,
Jun 26, 2017, 3:33:06 PM6/26/17
to Kivy users support
Hi,


I've been trying to learn Kivy by going through some of the tutorial videos and, as I own a Windows machine and wanted to try and build an Android program without a virtual machine I installed python-for-android and tried to use that, and everything went fine until it got to the final command and then it wouldn't seem to work, coming up with the same error every time. If anyone could help at all that would be great, thanks! File I'm trying to build is attached, as I said, really basic :)



Bash error output:

p4a apk --private --sdk_dir C:\Users\Matt\AppData\Local\Android\sdk C:\Users\Matt\.spyder-py3\files\Kivy\Crash_Course\1.2.py --name 'Hello!.py' --version 1.10.0 --bootstrap=sdl2 --requirements=python3,kivy --debug
[INFO]:    This python-for-android revamp is an experimental alpha release!
[INFO]:    It should work (mostly), but you may experience missing features or bugs.
[INFO]:    Will compile for the following archs: armeabi
[INFO]:    Found Android API target in $ANDROIDAPI
Traceback (most recent call last):
  File "/usr/local/bin/p4a", line 11, in <module>
    load_entry_point('python-for-android==0.4', 'console_scripts', 'p4a')()
  File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 754, in main
    ToolchainCL()
  File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 343, in __init__
    getattr(self, command_method_name)(unknown)
  File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 87, in wrapper_func
    user_ndk_ver=self.ndk_version)
  File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/build.py", line 226, in prepare_build_environment
    android = sh.Command(join(sdk_dir, 'tools', 'android'))
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1202, in __init__
    raise CommandNotFound(path)
sh.CommandNotFound: C:UsersMattAppDataLocalAndroidsdk/tools/android



Tutorial used to build program using python-for-android:

1.2.py

Alexander Taylor

unread,
Jun 26, 2017, 4:29:55 PM6/26/17
to Kivy users support
python-for-android does no support windows. There's an experimental PR for it at https://github.com/kivy/python-for-android/pull/994 , but this may need some effort to make work, may have problems even if it does work, and isn't expected to be supported in the master branch any time soon.

Matthew Buckley

unread,
Jun 26, 2017, 4:58:16 PM6/26/17
to Kivy users support
Ah okay, feel silly for not realising that sooner but thanks, I'll just look at setting up a VM then :) thanks!
Reply all
Reply to author
Forward
0 new messages