How to convert Kivy/KivyMD into Apk using Google Colab

In this article, We will Compile Python Kivy/KivyMD code into Android apk using Google Colab


Source code of this notebook code - https://github.com/wishrohitv/google-colab-for-kivy


Step 1 - Click this link https://colab.research.google.com/drive/16wji2BWd5HHlp7eNqBBcZONCxxCzV-jy?usp=sharing to open your own Colab cell


Step 2 - Upload your Source code on google colab 




or

Once you have uploaded project source code or cloned project repo now proceed to next



Step 3 - Now run each cell command one by one (ctrl+enter or click on square bracke`[ ]`))



Step 4 - Now run the command

buildozer init




This command will generate buildozer.spec file which is used to mention app name,icons and pip modules which used and app version and more


Step 5 - Explore this file with yourself and modify it as required





Step 6 - Now everything is ready to compile kivy code to android app

run this final command 


buildozer -v android debug



Step 7 - Enter y and now further this will ask you to accept google license, accept these and this process will take 15 to 30 minute for first time to compile


After successful compilation apk file will be produced in bin directory



Step 8 - Download the apk and install on android device, and if it crashes then use adb tool to debug it and fix and compile again


Hope it will helps, Thank you and give us feedback;


Python Kivy, Google Colab, Android Apk
1295
1732110596
wishrohitv wishrohitv
1732110596