如何将Kivy和Python文件编译为APK [英] How to compile kivy and python files to apk

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

问题描述

我想将python和kivy文件转换为有符号和无符号apk.我在Windows上工作,但用于在vm ware中的ubuntu中使用python for android进行编译.安装所有必需的模块(例如kivy,适用于android的python和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上使用. 请给我建议一下,我是新手. 谢谢 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天全站免登陆