How to package apk in python

(*-*)浩
Release: 2019-05-28 14:24:14
Original
22459 people have browsed it

Kivy is an open source Python framework used to quickly develop applications and implement various currently popular user interfaces, such as multi-touch and so on. And Kivy can run on most current mainstream desktop/mobile operating systems such as Windows, Linux, MacOS, Android, and iOS.

How to package apk in python

First you need to install the virtual machine VirtualBox. This is no problem. It was installed quickly. Then Kivy officially produced the image of the virtual machine (very considerate) , you can run it directly after downloading, saving you a lot of trouble.

After downloading and decompressing, open VB and load the virtual machine file in the folder, and then run (login password kivy):

How to package apk in python

Enter /home/kivydev//test is the test directory. py2apk in this directory is packaged with py27, and py3apk is packaged with py35. The only difference between these two versions is the different versions of py configuration files. The py files in this directory must be used Main.py can only be packaged after naming it. First compile main.py in this directory to see if it can be successfully executed: python3 After main.py can be successfully compiled, execute the packaging command in the directory of py2apk or py3apk:

p4a apk

The apk file can be generated in this directory;

This is only for testing, use the apk generated by main.py, The running effect on the mobile phone is as follows:

How to package apk in python

Afterword

At this point, the simple py file can be completed Encapsulated. As for how to write the py file to be suitable for the Android version, how to change the icon, and how to set the content inside, it is recommended to read the official document to learn,

The above is the detailed content of How to package apk in python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template