如何将kivy和python文件编译成apk [英] How to compile kivy and python files to apk

查看:45
本文介绍了如何将kivy和python文件编译成apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的 python 和 kivy 文件转换为签名和未签名的 apk.我在 Windows 上工作,但是为了在 vm ware 的 ubuntu 中使用 python for android 进行编译.安装所有必要的模块后,如 kivy、python for android 和 android studio.

i want to convert my python and kivy files into signed and unsigned apk. i work on windows but for compiling using python for android in ubuntu in vm ware. After installing all necessary modules like kivy, python for android and android studio.

当我编译时,它显示未找到 sdk 的错误.是否有任何选项可以在 windows 或 ubuntu 或 linux 中生成 apk.我也听说过 buildozer,它也适用于 Windows.请给我一些建议,我是 kivy 的新手.谢谢1

when i am compiling it's showing error that sdk not found. is there any option for generating apk in windows or ubuntu or linux. i also heard about buildozer and it also works on windows. please suggest me something on it i'm new to kivy. thanks 1

推荐答案

我建议使用 buildozer 而不是 p4a - buildozer 在内部使用它.它还可以自动为您下载指定的android sdk.

I suggest using buildozer instead of p4a - the buildozer uses it internally. It can also automatically download specified android sdk for you.

使用pip安装:sudo pip install buildozer

安装完成后,转到您的项目目录并输入:

Once you have it installed, go to your project directory and type:

buildozer init
# edit the buildozer.spec, then
buildozer android_new debug deploy run

在 github 上查找更多信息.

Find more info on the github.

这篇关于如何将kivy和python文件编译成apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆