What Android SDK/NDK combination should I use in buildozer.spec?

753 views
Skip to first unread message

Brian MacDiarmuide

unread,
Jun 18, 2015, 7:43:42 PM6/18/15
to kivy-...@googlegroups.com
I am wondering what a current recommended combination of Android sdk/ndk I should use in the buildozer.spec. I am having problems building apks for the last while, the latest of which appears to be:

E/AndroidRuntime( 1773): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "wait4" referenced by "libpython2.7.so"...

Which I read is due to a compatibility issue with NDK 9 and API 19. I read that here:

So can someone tell me what a good working combination is?

This is what my buildozer.spec looks like now:



# (int) Android API to use
android.api = 19

# (int) Minimum API required (8 = Android 2.2 devices)
#android.minapi = 8

# (int) Android SDK version to use
android.sdk = 23

# (str) Android NDK version to use
android.ndk = 9d

Brian MacDiarmuide

unread,
Jun 18, 2015, 7:45:30 PM6/18/15
to kivy-...@googlegroups.com
I should rectify the above to say that I can actually build and deploy the APK now, but the app crashes on startup. The above error is from logcat.

Arlo

unread,
Jun 18, 2015, 9:17:43 PM6/18/15
to kivy-...@googlegroups.com
I've always maintained my Android SDK/NDK myself and set:
android.sdk_path, android.ndk_path
(Though that's probably not your issue)

Currently, I have:

# (int) Android API to use
android.api = 14


# (int) Minimum API required (8 = Android 2.2 devices)
android.minapi = 8

# (int) Android SDK version to use
android.sdk = 22


# (str) Android NDK version to use
android.ndk = 10d

You can always make an empty directory and buildozer init to see the default. (android.api=14)
I'm not sure how safe bumping the sdk and ndk is, but I went for the latest ndk hoping for possible performance improvements and haven't noticed any difference.

mrto...@gmail.com

unread,
Jun 19, 2015, 8:23:55 AM6/19/15
to kivy-...@googlegroups.com
I've been using 19 and 9c lately, with build tools 22.0.1:
# (int) Android API to use
android.api = 19
# (int) Minimum API required (8 = Android 2.2 devices)
# android.minapi = 8
android.minapi = 9
# (int) Android SDK version to use
# see python for android bug #261.  Workaround sdk < 21, NDK < 10
android.sdk = 19
# (str) Android NDK version to use
android.ndk = 9c
#android.ndk = 10e

Also, and I don't know if this would help your build or not, I changed java.target and java.source properties in AndroidSDK/android-sdk-Linux/tools/ant/build.xml to make java happy.
<property name="java.target" value="1.7" />
<property name="java.source" value="1.7" />

You can set the build tools to use in the same file by editing the appropriate property. 

See http://stackoverflow.com/questions/18041769/error-cannot-run-aapt You might not need to do this either...just mentioning it in case.
    <property name="aapt" location="${sdk.dir}/build-tools/22.0.1/aapt" />
    <property name="aidl" location="${sdk.dir}/build-tools/22.0.1/aidl" />
    <property name="dx" location="${sdk.dir}/build-tools/22.0.1/dx" />
    <property name="zipalign" location="${sdk.dir}/build-tools/22.0.1/zipalign" />

Brian MacDiarmuide

unread,
Jun 21, 2015, 9:52:15 AM6/21/15
to kivy-...@googlegroups.com
Thank you both for your input on this. I'm going to try a couple of those combinations/suggestions.

Brian

Brian MacDiarmuide

unread,
Jun 21, 2015, 5:21:24 PM6/21/15
to kivy-...@googlegroups.com
Ok, I installed the sdk manager/tools etc. from here and reinstalled a lot of stuff. I then provided the buildozer.spec of a number of apps with a custom path to the sdk. It now works again! Thanks again for the help people.

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/QUguQb-s_W8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages