How to build a kivy app using buildozer and the latest kivy?

Using buildozer, I successfully created and launched an Android app. Buildozer uses kivy-stable (1.7)

How to create a kivy app using the latest kivy 1.8?

I noticed https://github.com/kivy/python-for-android/blob/master/recipes/kivy/recipe.sh lines

VERSION_kivy=${VERSION_kivy:-stable} URL_kivy=https://github.com/kivy/kivy/zipball/$VERSION_kivy/kivy-$VERSION_kivy.zip 

Does this mean that with buildozer only the kivy-enabled version can be used?

thanks

+6
source share
1 answer

I can’t remember if buildozer has a key for using kivy master (1.8 is not issued), but you can certainly make it work. Here are a few instructions assuming your shell is something bash -like.

First create your own kivy local repository:

 git clone https://github.com/kivy/kivy.git 

Second, export the P4A_kivy_DIR environment variable to point to this directory. If this variable exists, python-for-android (including loading and using buildozer) will use this directory to build kivy.

 export P4A_kivy_DIR="$PWD/kivy$ echo $P4A_kivy_DIR 

The second line should print the directory of your newly cloned kiwi.

Then you can run buildozer. You may need to first delete the .buildozer file in your application directory, or more specifically, some python components for Android, the easiest way to do this

 rm -rf /path/to/your/app/.buildozer/android/platform/python-for-android 

After that, just run buildozer and the python component for Android should use your copy of the kivy wizard.

If you want this behavior to work automatically every time, you can put the export string in your .bashrc or some other suitable shell installation file. If you do not, you will need to run the export line every time you create or replace the .buildozer directory.

+4
source

Source: https://habr.com/ru/post/957575/


All Articles