Compile Kivy for Android in Mac OS X

1,244 views
Skip to first unread message

Pedro Couto

unread,
Jul 31, 2013, 11:49:00 AM7/31/13
to kivy-...@googlegroups.com
Hi, so, my work on a Mac OS X, and i wondered if it is possible to compile the .apk file for Android with my system, without recurring to a Virtual box system.

Also, i'm working on a plugin for Kivy, a data_grid, if anyone wants to help, you're welcome ;)

Here is the link:

Thanks!

Mathieu Virbel

unread,
Aug 3, 2013, 6:26:03 PM8/3/13
to kivy-...@googlegroups.com
Hi,

python-for-android works on osx. :)

Mathieu

Le 31/07/2013 17:49, Pedro Couto a �crit :
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Pedro Couto

unread,
Aug 6, 2013, 5:42:28 AM8/6/13
to kivy-...@googlegroups.com
Hum... Maybe it has something to do with my paths definitions... 

I will try to correct them. If I'm successful, I will write a tutorial for compiling Android Apps in Mac OS X!

Best regards,

Pedro


Sábado, 3 de Agosto de 2013 23:26:03 UTC+1, Mathieu Virbel escreveu:
Hi,

python-for-android works on osx. :)

Mathieu

Le 31/07/2013 17:49, Pedro Couto a �crit :

hci...@gmail.com

unread,
Aug 6, 2013, 11:02:48 AM8/6/13
to kivy-...@googlegroups.com
python-for-android works on osx. :) 

I've been looking on these forums for a long time for a way to do this and all I've found is people saying you can't for the reason that darwin != linux. So I'm stoked that you're saying it is possible! Is there something that you could point me and Pedro to that would give a good starting point for doing this? I'll help with a tutorial so others can do this too. The VBox is not working for me because here at work all our projects are on an MS share drive that the Vbox has no access to. 

Pedro Couto

unread,
Sep 23, 2013, 1:51:44 PM9/23/13
to kivy-...@googlegroups.com
Mathieu, do you know how to do that?

Regards,

Pedro

ZenCODE

unread,
Sep 24, 2013, 2:24:49 PM9/24/13
to kivy-...@googlegroups.com
Okay, so I think we need some more into to help this thread.

http://kivy.org/docs/guide/packaging-macosx.html

If you follow these instructions, at what exact point does it go wrong and what are the exact errors? We have built Kivy for iOS on MacOSX without issues (that were not caused by our firewall). Never tried building the for Android as I'm more comfy on Linux. But still, I think it's clear that we need more info on what the errors are before making any progress....;-)

Peace out

Mathieu Virbel

unread,
Sep 25, 2013, 3:11:05 PM9/25/13
to kivy-...@googlegroups.com
It should work. I did few fixes for cross-compilation from osx ->
android. Just checkout python-for-android, follow the documentation
carefully, and you should have your apk.

While it was working (tested only with ./distribute.sh -m 'kivy'), it
might be possible that others libs need fixes as well. Because
hostpython detect the system as "darwin", not "linux". So most of the
times, when an extension compiled, it compiles for osx, not linux.

And if you try to change manually hostpython to say it's linux... then
nothing works because it think he's on a linux system.

Mathieu

Le 31/07/2013 17:49, Pedro Couto a �crit :

Cyril Coelho

unread,
Apr 29, 2017, 4:13:13 AM4/29/17
to Kivy users support
how to? for hostpython detect the system as "linux", not "darwin"?
How to change hostpython?

if i make apk debug with "buildozer android debug" on linux: its work!
if i make apk debug with "buildozer android debug" on Mac OS: don't work...
apk from mac os crash after run ...

how to fix problem ?

Irurik Soft Labs

unread,
Apr 4, 2020, 1:46:51 AM4/4/20
to Kivy users support
The app build with bulldozer android debug is successful but it is crashing on mobile after splash screen. 
Following is the error displaying on handset:

Build fingerprint: 'xiaomi/onc/onc:9/PKQ1.181021.001/V10.3.6.0.PFFINXM:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 5386, tid: 5407, name: SDLThread  >>> com.isl.bmicalculator <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    r0  00000000  r1  0000151f  r2  00000006  r3  00000008
    r4  0000150a  r5  0000151f  r6  d371c87c  r7  0000010c
    r8  d39f1a50  r9  00000002  r10 ec192100  r11 d371c8a8
    ip  f23733d8  sp  d371c868  lr  f22e2621  pc  f22d9e5e

backtrace:
    #00 pc 0001ce5e  /system/lib/libc.so (abort+58)
    #01 pc 001ba620  /data/app/com.isl.bmicalculator-M3Cf1Lb9VCWGrF3ySS-E3A==/lib/arm/libpython3.7m.so (offset 0x83000)


What is the way to resolve out as no clue is there to debug because no error is found in building logs.
Can someone guide or suggest as I am stuck since long time and I am very eager to build the successful running apk.

Moqing Yu

unread,
Apr 4, 2020, 2:41:43 AM4/4/20
to kivy-...@googlegroups.com
normally, crash is cause by missing modules, please using adb to catch the log.  and  check the log file which module is missing

Irurik Soft Labs <iruriks...@gmail.com> 于 2020年4月4日周六 下午1:46写道:
--
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.

Irurik Soft Labs

unread,
Apr 10, 2020, 9:41:32 AM4/10/20
to Kivy users support
I tried using adb but it failed in install command. PFB the error logs:

# Deploy on emulator-5554

# Run './.buildozer/android/platform/android-sdk/platform-tools/adb install -r "./bin/kvcalc__armeabi-v7a-0.1-armeabi-v7a-debug.apk"'

# Cwd ./.buildozer/android/platform

adb: failed to install __armeabi-v7a-0.1-armeabi-v7a-debug.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]


I also tried looking into the packed lib modules in app which are as below. Can you figure out which module is missing, even I can share the logs if you can figure out which one is missing to rectify the issue further.

./.buildozer/android/platform/android-sdk/tools/bin/apkanalyzer files list bin/kvcalc__armeabi-v7a-0.1-armeabi-v7a-debug.apk

/

/resources.arsc

/res/

/res/layout/

/res/layout/project_empty.xml

/res/layout/project_chooser.xml

/res/layout/main.xml

/res/layout/chooser_item.xml

/res/drawable/

/res/drawable/presplash.jpg

/res/drawable/icon.png

/res/drawable-xxhdpi-v4/

/res/drawable-xxhdpi-v4/ic_launcher.png

/res/drawable-xhdpi-v4/

/res/drawable-xhdpi-v4/ic_launcher.png

/res/drawable-mdpi-v4/

/res/drawable-mdpi-v4/ic_launcher.png

/res/drawable-hdpi-v4/

/res/drawable-hdpi-v4/ic_launcher.png

/lib/

/lib/armeabi-v7a/

/lib/armeabi-v7a/libssl1.1.so

/lib/armeabi-v7a/libsqlite3.so

/lib/armeabi-v7a/libpython3.7m.so

/lib/armeabi-v7a/libmain.so

/lib/armeabi-v7a/libhidapi.so

/lib/armeabi-v7a/libffi.so

/lib/armeabi-v7a/libcrypto1.1.so

/lib/armeabi-v7a/libSDL2_ttf.so

/lib/armeabi-v7a/libSDL2_mixer.so

/lib/armeabi-v7a/libSDL2_image.so

/lib/armeabi-v7a/libSDL2.so

/classes.dex

/assets/

/assets/private.mp3

/META-INF/

/META-INF/MANIFEST.MF

/META-INF/CERT.SF

/META-INF/CERT.RSA

/AndroidManifest.xml

(kv376_proj) PinkSss-MBP:buildozer_android $


On Wednesday, July 31, 2013 at 9:19:00 PM UTC+5:30, Pedro Couto wrote:

Miguel Enriquez

unread,
Apr 12, 2020, 9:55:35 PM4/12/20
to Kivy users support

Robert Flatt

unread,
Apr 12, 2020, 10:14:18 PM4/12/20
to Kivy users support

Irurik Soft Labs

unread,
Apr 17, 2020, 12:52:13 PM4/17/20
to Kivy users support
I tried using on Linux CentOS and the building is successful. Even the app is running on the mobile handset perfectly as desired.

But I want the support for MacOSX.
If the backer's can guide me rectifying the issue on Mac than I would feel more than happy to contribute for the same for the world.

Actually, I was building the successful handset running apk on MacOSX more than 14 months back, 
But Google depreciated and stopped lower android API versions support due to which sdk, ndk versions requires to be upgraded and the building APK started failing. 
Since 2 months only I succeeded in building APK on MacOSX but it crashes on running over handset and I am still struggling to figure out the exact linking problem in apk which reasons out for crashing on handset post splash screen display..
Reply all
Reply to author
Forward
0 new messages