Kivy Complete VM supporting API 27

1,620 views
Skip to first unread message
Assigned to bast...@gmail.com by me

ZenCODE

unread,
Jul 17, 2018, 8:05:31 AM7/17/18
to Kivy users support
Greetings all

This post serves to announce the release of Version 0.3 of the Kivy Complete VM based on Xubuntu 16.04. This VM comes pre-installed with all the libraries, SDK's and NDK's necessary to run Kivy 1.10.1 and build Android APks using Python2 or Python3 supporting Android API's 19 and 27.

Because these requirements are contained in the VM, it's not small. But it works and it's an easy solution if you need to build Kivy APK's. You can download and read more about the VM here:

    https://github.com/Zen-CODE/kivybits/tree/master/KivyCompleteVM

For those wanting to build against API 27 without the weight of a full VM, I have prepared some notes for doing so. I encountered quite a few issue getting API 27 going, so hopefully this helps anyone trying to do the same.

# Python 2

## Versions used

    OS: Xubuntu 16.04 (64-bit)
    Kivy: 1.10.1
    Builozer: git checkout of master, 2018-07-14 (068bf9c42e60b5e231477ee5fa02a1e6f7392183)
    Cython: 0.25.2
    Android NDK Revision 16 (https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip)
    python-for-android: git checkout of master, 2018-07-15 (8983db5e287ba6d609b00dd6bb81599b0a782097)

## Buildozer.spec file

Assuming the standard buildozer.spec file here: https://raw.github.com/kivy/buildozer/master/buildozer/default.spec

We made the following modifications:

    requirements = kivy==1.10.1
    android.sdk = 23
    android.ndk_path = <path_to_android-ndk-r16b>
    p4a.source_dir = <path_to_python-for-android>
    log_level = 2

# Python 3

The Python 3 build uses the same settings for Python 2, except that it references the Crystax NDK instead of the official Android NDK above.

## Versions used

    Crystax NDK 10.3.2: https://www.crystax.net/download/crystax-ndk-10.3.2-linux-x86_64.tar.xz

This NDK does not contain the Android API 27 by default, so you need to add it manually. To do this, from inside the android-ndk-r16b above, copy the "android-27" folder from "platforms" to the "platforms" folder in the Crystax NDK.

## Buildozer.spec file

Assuming the same spec file as for Python 2, we made the following modifications:

    android.ndk_path = <path_to_crystax-ndk>

Notes
-----

When setting up the build environment on linux, ensure you have the SDL dependencies installed.

    https://kivy.org/docs/installation/installation-linux.html#dependencies-with-sdl2

Running Kivy apps in the VM using VirtualBox may give errors if 3D acceleration is enabled. To fix this, disable 3D acceleration.

    https://github.com/kivy/kivy/issues/5348


Dave McCormick

unread,
Jul 17, 2018, 8:26:45 AM7/17/18
to kivy-...@googlegroups.com
Thank you !!!!

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c7b45d22-67be-4f71-a8fd-5a649078c012%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Глеб Самойлов

unread,
Jul 18, 2018, 4:35:36 AM7/18/18
to Kivy users support
Thank you! Recently I collected such a machine for myself. I spent a week.

вторник, 17 июля 2018 г., 15:05:31 UTC+3 пользователь ZenCODE написал:

Carsten Thielepape

unread,
Jul 20, 2018, 2:13:47 AM7/20/18
to Kivy users support
Hi, thanks for your work. but no luck.

I imported the vm and made no changes
I copied the buildozer.spec (python3) from touchtracer to showcase
Verified the ~/Android/crystax-ndk-10.3.2/android/platforms/android-27 is there
Kicked of buildozer with "buildozer -v android release"

And get the following error. (and I am not sure if it builds to python 3)



arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=27 -I/home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -isysroot /home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -I/home/kivy/Repos/Python3/kivy/examples/demo/showcase/.buildozer/android/platform/build/build/python-installs/myapp/include/python2.7 -c -fno-strict-aliasing -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=27 -I/home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -isysroot /home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -I/home/kivy/Repos/Python3/kivy/examples/demo/showcase/.buildozer/android/platform/build/build/python-installs/myapp/include/python2.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -DNO_MALLINFO -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include  -fPIC -DPy_BUILD_CORE -o Parser/node.o Parser/node.c
In file included from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/syslimits.h:7:0,
                 from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:34,
                 from Include/Python.h:19,
                 from Parser/grammar1.c:4:
/home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
In file included from Parser/grammar1.c:4:0:
Include/Python.h:33:19: fatal error: stdio.h: No such file or directory
compilation terminated.
In file included from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/syslimits.h:7:0,
                 from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:34,
                 from Include/Python.h:19,
                 from Include/pgenheaders.h:10,
                 from Parser/acceler.c:13:
/home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
In file included from Include/pgenheaders.h:10:0,
                 from Parser/acceler.c:13:
Include/Python.h:33:19: fatal error: stdio.h: No such file or directory
compilation terminated.
Makefile:1165: recipe for target 'Parser/grammar1.o' failed
make: *** [Parser/grammar1.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/syslimits.h:7:0,
                 from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:34,
                 from Include/Python.h:19,
                 from ./Modules/python.c:3:
/home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
In file included from ./Modules/python.c:3:0:
Include/Python.h:33:19: fatal error: stdio.h: No such file or directory
compilation terminated.
Makefile:1165: recipe for target 'Parser/acceler.o' failed
make: *** [Parser/acceler.o] Error 1
Makefile:558: recipe for target 'Modules/python.o' failed
make: *** [Modules/python.o] Error 1
In file included from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/syslimits.h:7:0,
                 from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:34,
                 from Include/Python.h:19,
                 from Include/pgenheaders.h:10,
                 from Parser/listnode.c:4:
/home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
In file included from Include/pgenheaders.h:10:0,
                 from Parser/listnode.c:4:
Include/Python.h:33:19: fatal error: stdio.h: No such file or directory
compilation terminated.
Makefile:1165: recipe for target 'Parser/listnode.o' failed
make: *** [Parser/listnode.o] Error 1
In file included from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/syslimits.h:7:0,
                 from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:34,
                 from Include/Python.h:19,
                 from Parser/node.c:3:
/home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
In file included from Parser/node.c:3:0:
Include/Python.h:33:19: fatal error: stdio.h: No such file or directory
compilation terminated.
Makefile:1165: recipe for target 'Parser/node.o' failed
make: *** [Parser/node.o] Error 1


  STDERR:

# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy==1.10.1 --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/kivy/Repos/Python3/kivy/examples/demo/showcase/.buildozer/android/platform/build
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
kivy@kivy-complete:~/Repos/Python3/kivy/examples/demo/showcase$ 



ZenCODE

unread,
Jul 20, 2018, 2:20:50 AM7/20/18
to Kivy users support
Hmm. Does it build in touchtracer? The only thing I did after a successful build was remove the .buildozer folder, which should be recreated on the next run.

Глеб Самойлов

unread,
Jul 20, 2018, 3:15:25 AM7/20/18
to kivy-...@googlegroups.com
I had exactly the same error.

20 июля 2018 г. 9:20 пользователь "ZenCODE" <zenkey....@gmail.com> написал:
Hmm. Does it build in touchtracer? The only thing I did after a successful build was remove the .buildozer folder, which should be recreated on the next run.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.

Carsten Thielepape

unread,
Jul 20, 2018, 3:53:18 AM7/20/18
to Kivy users support
Same result with touchtracer

ZenCODE

unread,
Jul 20, 2018, 3:56:43 PM7/20/18
to Kivy users support
That's really strange. It was building without errors before I cleaned and packaged, but now I get the same error. Something must have been removed in this process. Looking into that now....

ZenCODE

unread,
Jul 21, 2018, 8:24:25 AM7/21/18
to Kivy users support
Okay, it looks like there is a missing requirement for python3cystax in the requirements line in the buildozer.spec file.
```
    requirements = kivy==1.10.1,python3crystax

The SDL2 dependencies are installed, as are the 32 bit libs listed here: http://buildozer.readthedocs.io/en/latest/installation.html

@inclement. Any suggestions?

ZenCODE

unread,
Jul 25, 2018, 9:13:06 AM7/25/18
to Kivy users support
Hi

Okay, so it seems I need to build the crystax NDK to support the desired API levels. I will do that and re-post when it is ready.

For clarity: The current VM builds Kivy APK's using Python2 for API 19 and 27. Python3 works for API 19, but API 27 is currently not working. 

John Green

unread,
Jul 25, 2018, 4:01:22 PM7/25/18
to Kivy users support
Ideal Zen,

look forward to implementing 27 on python 3. I see a post in play console saying come december only api 28 targets will be accepted. hope this will happen soon too :)

Carsten Thielepape

unread,
Jul 25, 2018, 6:00:26 PM7/25/18
to Kivy users support
It would be great to have an API level "in between". 19 (4.4) is missing some interesting features, 27 (8.1) is rarely supported in the field. So 23 (6.x) ios supported by 80% of the devices so I really would appreciate to be able to create an APK for this API level. (and in Python 3, as support for 2.7 has been announced to stop eoy)

ZenCODE

unread,
Jul 26, 2018, 3:11:43 AM7/26/18
to Kivy users support

Hi

Okay, the Python3 builds are now working. In the cleanup, I removed some folders I thought were not required. They are. Assumption is the mother..:-)

Anyway, I am preparing a new VM, but for those who want to get the 0.3 VM going, here are the steps.. It requires a few downloads, so you may want to wait for the next VM.


1. From the archive https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip,

    extract the content "platforms" folder to "/home/kivy/Android/android-ndk-r16b/platforms"


2. From archive https://www.crystax.net/download/crystax-ndk-10.3.2-darwin-x86_64.tar.xz

    extract the content "platforms" folder to "/home/kivy/Android/crystax-ndk-10.3.2/platforms"


3. Copy the following folders into /home/kivy/Android/crystax-ndk-10.3.2/platforms

    /home/kivy/Android/android-ndk-r16b/platforms/android-22

    /home/kivy/Android/android-ndk-r16b/platforms/android-23

    /home/kivy/Android/android-ndk-r16b/platforms/android-26

    /home/kivy/Android/android-ndk-r16b/platforms/android-27


@John Green. Yes, this episode has taught me how to add API support. It "should" be trivial to add 28...

@Carsten Thielpape. Yes, you should be able to use any API in between. I have only tested 19 and 27 though.

Will make a new post when these issue are fixed in the VM. 

Carsten Thielepape

unread,
Jul 26, 2018, 5:20:02 AM7/26/18
to Kivy users support
Hi, will test it out tonight, Thx in advance

ZenCODE

unread,
Jul 26, 2018, 8:12:32 AM7/26/18
to Kivy users support
Ps. If you run into the sh.CommandNotFound: ndk_build error, see here: https://github.com/kivy/python-for-android/issues/1292

ZenCODE

unread,
Jul 27, 2018, 2:10:08 AM7/27/18
to Kivy users support

ZenCODE

unread,
Jul 27, 2018, 1:02:00 PM7/27/18
to Kivy users support
@John Green. I only find docs mentioning API 26 e.g. https://developer.android.com/distribute/best-practices/develop/target-sdk

I also never got any mention of api 28 via the play console. Are you sure about that? Any corroborating docs? Not that I think it will be a problem. Just interested...

OptimusGREEN

unread,
Jul 28, 2018, 7:58:05 AM7/28/18
to Kivy users support
You're absolutely right. my mistake. it is api 26.

Carsten Thielepape

unread,
Jul 29, 2018, 11:01:59 AM7/29/18
to Kivy users support
Hi,

has anything  changed in the buildozer/signing setup? It compiles but signing does not work.

I did setup the keystore as documented (and this did work in the past): And I am sure that the keypath , the alias and the passwords are correct.

$ mkdir ~/keystores/
 $ keytool -genkey -v -keystore ~/keystores/<your-new-key>.keystore -alias <your-key-alias> -keyalg RSA -keysize 2048 -validity 10000
$ export P4A_RELEASE_KEYSTORE=~/keystores/<your-new-key>.keystore
 $ export P4A_RELEASE_KEYSTORE_PASSWD=android
 $ export P4A_RELEASE_KEYALIAS_PASSWD=android
 $ export P4A_RELEASE_KEYALIAS=<your-key-alias>



[DEBUG]:    :packageRelease FAILED
[DEBUG]:   
[DEBUG]:    FAILURE: Build failed with an exception.
[DEBUG]:   
[DEBUG]:    * What went wrong:
[DEBUG]:    Execution failed for task ':packageRelease'.
[DEBUG]:    > com.android.ide.common.signing.KeytoolException: Failed to read key ORCAKEY from store "/home/kivy/keystores/orca-release-key.keystore": Keystore was tampered with, or password was incorrect
[DEBUG]:   
[DEBUG]:  


Am Dienstag, 17. Juli 2018 14:05:31 UTC+2 schrieb ZenCODE:

Carsten Thielepape

unread,
Jul 29, 2018, 2:55:13 PM7/29/18
to Kivy users support
Got it, An import of the google cert was missing


Am Dienstag, 17. Juli 2018 14:05:31 UTC+2 schrieb ZenCODE:

OptimusGREEN

unread,
Jul 29, 2018, 3:37:09 PM7/29/18
to Kivy users support
Can you share your process for those that don't know?

Сергей Кузнецов

unread,
Aug 4, 2018, 2:34:48 PM8/4/18
to Kivy users support
Hello! after build in this VM, plyer demo gps app don't start. can u help me thith this ?

ZenCODE

unread,
Aug 4, 2018, 5:19:16 PM8/4/18
to Kivy users support
@Сергей Кузнецов. Does an app not using plyer build? Then does it build using Python2? Python3?

Сергей Кузнецов

unread,
Aug 5, 2018, 2:07:16 AM8/5/18
to Kivy users support


воскресенье, 5 августа 2018 г., 2:19:16 UTC+5 пользователь ZenCODE написал:
@Сергей Кузнецов. Does an app not using plyer build? Then does it build using Python2? Python3?
demo app touchtracer working good. plyer gps demo app not working in python 3 and python 2 too.

ZenCODE

unread,
Aug 5, 2018, 8:49:02 AM8/5/18
to Kivy users support
@Сергей Кузнецов. Okay. Please create a new ticket for that at it seems plyer specific. You would also need to post the log file containing the error so we have something to work with.

Thanks

Quan Lin

unread,
Aug 6, 2018, 7:21:11 PM8/6/18
to Kivy users support
Thank you very much for your work ZenCODE!!
I tried with the new VM 0.4.
touchtracer compiled but when it ran on Android phone(Samsung S6) it reported "SDL Error"
The splash image showed and then a popup showed up saying:

SDL Error
An error occurred while trying to start the application. Please try again and/or reinstall.
Error: dlopen failed: can not locate symbol "ctermid" referenced by "/data/app/org.test.touchtracer-1/lib/arm/libpython2.7.so"...

Do you have any idea how to fix it?

srinivas sagit

unread,
Aug 6, 2018, 10:15:53 PM8/6/18
to kivy-...@googlegroups.com
Sl4a and njnuis will work on this machine?

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.

ZenCODE

unread,
Aug 7, 2018, 3:06:09 PM8/7/18
to Kivy users support
@QuanTech. Did you first build for API 19? That needs to be done before any building is successful. What API are you using to test?

@srinivas sagit. No idea. That are separate projects.


QuanTech

unread,
Aug 7, 2018, 8:01:04 PM8/7/18
to Kivy users support
@ZenCODE. Here's the update of my experiment:
With a fresh project folder(no .buildozer folder inside), I built for API 19 first(so .buildozer and bin folder is generated, and debug.apk is now in bin folder).
And then I modified the API level to 27 in buildozer.spec and left .buildozer folder as it was. After I built for API 27, a new debug.apk is generated.
By "deploy run", it ran on Android phone without any problem. The touchtracer app works well as expected.
And then without any change I built a release version of this app and got it aligned and signed correctly.
On Google Play Console website, I created an experimental app project and tried to upload this release apk but failed:

####################

Upload failed

Your app currently targets API level 19 and must target at least API level 26 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 26.

########################
It looks like building for API 19 first and then for 27 does not refresh the API level in the apk. 

WAF

unread,
Aug 30, 2018, 7:02:05 AM8/30/18
to Kivy users support
Hi, I'm having an oshbike with 32 bit libraries. To put them you need a root, but I do not know the password from him.

What is the root password on this virtual machine?

вторник, 17 июля 2018 г., 15:05:31 UTC+3 пользователь ZenCODE написал:

ZenCODE

unread,
Aug 30, 2018, 2:24:32 PM8/30/18
to Kivy users support
The password is "kivy"

Глеб Самойлов

unread,
Sep 1, 2018, 12:00:24 PM9/1/18
to Kivy users support
Open directory - Repos/Python3/kivy/examples/demo/touchtracer
Open terminal and run command - buildozer android debug
Get error:

[INFO]:    pyjnius first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize jnius/jnius.pyx
[INFO]:    -> running cython ./jnius/jnius.pyx
[INFO]:    -> running python3.5 setup.py build_ext -v
()                                                                            
           Exception in thread background thread for pid 2221:                
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/kivy/.local/lib/python2.7/site-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/home/kivy/.local/lib/python2.7/site-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/kivy/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
ErrorReturnCode_1:

  RAN: /usr/bin/python3.5 setup.py build_ext -v

  STDOUT:
/usr/lib/python3/dist-packages/setuptools/dist.py:285: UserWarning: Normalizing '1.1.2-dev' to '1.1.2.dev0'
  normalized_version,
running build_ext
skipping 'jnius/jnius.c' Cython extension (up-to-date)
building 'jnius' extension
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=27 -I/home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -isysroot /home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -I/home/kivy/Repos/Python3/kivy/examples/demo/touchtracer/.buildozer/android/platform/build/build/python-installs/myapp/include/python3.5 -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -I/home/kivy/Android/crystax-ndk-10.3.2/sources/python/3.5/include/python -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=27 -I/home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -isysroot /home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -I/home/kivy/Repos/Python3/kivy/examples/demo/touchtracer/.buildozer/android/platform/build/build/python-installs/myapp/include/python3.5 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c jnius/jnius.c -o build/temp.linux-x86_64-3.5/jnius/jnius.o
In file included from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/syslimits.h:7:0,
                 from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:34,
                 from /home/kivy/Android/crystax-ndk-10.3.2/sources/python/3.5/include/python/Python.h:11,
                 from jnius/jnius.c:4:
/home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
In file included from jnius/jnius.c:4:0:
/home/kivy/Android/crystax-ndk-10.3.2/sources/python/3.5/include/python/Python.h:25:19: fatal error: stdio.h: No such file or directory
compilation terminated.
error: command 'arm-linux-androideabi-gcc' failed with exit status 1


  STDERR:


[INFO]:    STDOUT:
    /usr/lib/python3/dist-packages/setuptools/dist.py:285: UserWarning: Normalizing '1.1.2-dev' to '1.1.2.dev0'   
  normalized_version,   
running build_ext   
skipping 'jnius/jnius.c' Cython extension (up-to-date)   
building 'jnius' extension   
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=27 -I/home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -isysroot /home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -I/home/kivy/Repos/Python3/kivy/examples/demo/touchtracer/.buildozer/android/platform/build/build/python-installs/myapp/include/python3.5 -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -I/home/kivy/Android/crystax-ndk-10.3.2/sources/python/3.5/include/python -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=27 -I/home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -isysroot /home/kivy/Android/crystax-ndk-10.3.2/platforms/android-27/arch-arm -I/home/kivy/Repos/Python3/kivy/examples/demo/touchtracer/.buildozer/android/platform/build/build/python-installs/myapp/include/python3.5 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c jnius/jnius.c -o build/temp.linux-x86_64-3.5/jnius/jnius.o   
In file included from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/syslimits.h:7:0,   
                 from /home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:34,   
                 from /home/kivy/Android/crystax-ndk-10.3.2/sources/python/3.5/include/python/Python.h:11,   
                 from jnius/jnius.c:4:   
/home/kivy/Android/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/5.3/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h   
In file included from jnius/jnius.c:4:0:   
/home/kivy/Android/crystax-ndk-10.3.2/sources/python/3.5/include/python/Python.h:25:19: fatal error: stdio.h: No such file or directory   
compilation terminated.   
error: command 'arm-linux-androideabi-gcc' failed with exit status 1
[INFO]:    STDERR:
   
[INFO]:    COMMAND:
cd /home/kivy/Repos/Python3/kivy/examples/demo/touchtracer/.buildozer/android/platform/build/build/other_builds/pyjnius-python3crystax-sdl2/armeabi-v7a/pyjnius && /usr/bin/python3.5 setup.py build_ext -v

[WARNING]: ERROR: /usr/bin/python3.5 failed!


вторник, 17 июля 2018 г., 14:05:31 UTC+2 пользователь ZenCODE написал:

ZenCODE

unread,
Sep 1, 2018, 5:08:29 PM9/1/18
to Kivy users support
Indeed. In the notes here  you will see the below note. Even though you can get the build to succeed when specifying API 27, it still seems to use API 19 under the hood. I am looking into that.

Note: It appears that builds for later API's only succeed if you build for
API 19 first. So please build for API 19 first, then your desired API level.
This will hopefully be resolved in later releases.

Ailton Ccetti

unread,
Oct 24, 2018, 11:45:36 PM10/24/18
to Kivy users support
Hello everyone, it really is a problem, I suffered a lot with this, I created an alternative solution while the problem is not solved, I created a script that reworked every application, generated the keystore, signed, I hope to help, sorry for my weak English.



Reply all
Reply to author
Forward
0 new messages