Is it a clear way to make APK

33 views
Skip to first unread message

Peter Peter

unread,
Dec 27, 2018, 6:30:23 PM12/27/18
to Kivy users support
Hello, 
I work on Windows, program in Python and use Kivy.
I've tried for more than 20 hours to make an APK, installing VM, using buildozer, and so on.
I spent so much time reading different forum and google nearly everything.
And never manage to make an APK. Oh yes, just one but not working, crash just after start...

So my question is: 

Is it possible to find clear and precise instructions how to make APK ?

Глеб Самойлов

unread,
Dec 27, 2018, 6:39:01 PM12/27/18
to Kivy users support
Download virtual machine - https://github.com/Zen-CODE/kivybits/tree/master/KivyCompleteVM
Everything is written there in detail.

пятница, 28 декабря 2018 г., 2:30:23 UTC+3 пользователь Peter Peter написал:

Robert Flatt

unread,
Dec 27, 2018, 10:30:32 PM12/27/18
to Kivy users support
I gave up on the tools that 'help' (this was before latest VM), and just used p4a directly. I made these instructions:

As for crash after start, try to get something very simple like Hello World working first.

Peter Peter

unread,
Dec 28, 2018, 2:44:16 AM12/28/18
to Kivy users support
Thanks, 
I had already the last image VM, so I will try again.
Do I have to put my main.py in a specific folder in VM ?

Peter Peter

unread,
Dec 28, 2018, 4:20:25 AM12/28/18
to Kivy users support
It is ok now, I finally manage to build a working APK with the last VM by putting my main.py in
Python3: /home/kivy/Repos/Python3/kivy/examples/

By now I have one more question:

Is it normal that the APK file is more than 10 Mo? (the main.py and .kv file together are only 2 ko)
and is it possible to make it smaller?

A big thanks for your help!

JC

unread,
Dec 28, 2018, 4:21:54 AM12/28/18
to Kivy users support


Make sure you start with the buuldozer.spec file used in the examples of the VM mchine. It is described in the readme file in the desktop of the VM

Start simple, build up. In my experience it gets really tricky when you start using specific functionalities of the phone harware. Other than that I have been successful and I am not at all a mobile programmer, though I know my way around python.

JC

Peter Peter

unread,
Dec 28, 2018, 7:08:04 AM12/28/18
to Kivy users support
it works well with simple files.
Now I have a sqlite3 data base file. I wrote the sqlite3 in the buildozer.spec.
Do I have to indicate in this buildozer.spec the path of data.db file? (it is in the same folder as main.py)

Robert Flatt

unread,
Dec 28, 2018, 12:28:50 PM12/28/18
to Kivy users support
That size is reasonable. However be aware that p4a will include other files in your project directory that you might not expect.

Curious about the contents? Here are instructions for unpacking the .apk , a combination of unzip and tar. See section 1.9.4
Reply all
Reply to author
Forward
0 new messages