Using buildozer I have successfully built and run an Android application. Buildozer uses kivy-stable (1.7)
How do I build a kivy application using the latest kivy 1.8 ?
I noticed at https://github.com/kivy/python-for-android/blob/master/recipes/kivy/recipe.sh the lines
VERSION_kivy=${VERSION_kivy:-stable}
URL_kivy=https://github.com/kivy/kivy/zipball/$VERSION_kivy/kivy-$VERSION_kivy.zip
Does this mean that only the kivy-stable version can be used with buildozer ?
Thanks
0 Kivy supports both Python >= 2.7 and Python >= 3.4 with the same codebase. Python 3 is also now supported by python-for-android. However, be aware that while Kivy will run in Python 3.4+, our iOS build tools still require Python 2.7.
Buildozer is a tool that aim to package mobiles application easily. It automates the entire build process, download the prerequisites like python-for-android, Android SDK, NDK, etc.
Packaging your application for the Kivy Launcher¶Go on Google Play Store and search for Kivy Launcher from kivy org. Click on Install. Select your phone… And you're done!
I can't remember if buildozer has a switch to use kivy master (1.8 is unreleased), but you can certainly make it work. Here's a few instructions assuming your shell is something bash-like.
First, create your own local kivy repository:
git clone https://github.com/kivy/kivy.git
Second, export the environment variable P4A_kivy_DIR
to point at this directory. If this variable exists, python-for-android (including the one downloaded and used by buildozer) will use that directory to build kivy.
export P4A_kivy_DIR="$PWD/kivy$
echo $P4A_kivy_DIR
The second line should print out the directory of your newly cloned kivy.
You can then run buildozer. You might need to first delete the .buildozer file in your app dir, or more specifically some of the python-for-android components - easiest is just to do
rm -rf /path/to/your/app/.buildozer/android/platform/python-for-android
After that, just run buildozer and the python-for-android component should use your copy of kivy master.
If you want this behaviour to automatically work every time, you could put the export line in your .bashrc or some other suitable shell setup file. If you don't do this, you'll need to run the export line every time you create or replace a .buildozer directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With