从Python / Kivy源代码构建一个APK for android

时间:2023-01-04 20:24:59

I am on trying to move a python/kivy app from a virtual machine to android device. Here is what I did:

我正在尝试将python / kivy应用程序从虚拟机移动到Android设备。这是我做的:

git clone https://github.com/kivy/buildozer.git 
cd buildozer
sudo python2.7 setup.py install

to get buidozer. Then change the project directory from the shared folder to code/kivy/examples/demo and then type buildozer init to get buildozer spec and finally type buildozer android debug deploy run to build the apk. I got the following error message:

获得buidozer。然后将项目目录从共享文件夹更改为code / kivy / examples / demo,然后键入buildozer init以获取buildozer规范,最后键入buildozer android debug deploy run来构建apk。我收到以下错误消息:

Run prebuild
Call prebuild_hostpython
Call prebuild_python
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN Python-2.7.2/configure ltib/rpm/BUILD/Python-2.7.2/configure
|--- Python-2.7.2/configure 2011-06-11 11:46:28.000000000 -0400
|+++ ltib/rpm/BUILD/Python-2.7.2/configure  2011-11-14 12:10:41.011373524 -0500
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 25
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN Python-2.7.2/Makefile.pre.in ltib/rpm/BUILD/Python-2.7.2/Makefile.pre.in
|--- Python-2.7.2/Makefile.pre.in   2011-06-11 11:46:26.000000000 -0400
|+++ ltib/rpm/BUILD/Python-2.7.2/Makefile.pre.in    2011-11-14 12:10:41.013373444 -0500
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
6 out of 6 hunks ignored
patching file setup.py
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
6 out of 6 hunks ignored -- saving rejects to file setup.py.rej
# Command failed: ./distribute.sh -m "kivy" -d "myapp"
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

Thanks in advance for any help.

在此先感谢您的帮助。

2 个解决方案

#1


To fix this issue run this command buildozer android clean and then rebuild it using buildozer android debug or automatically run using buildozer android debug deploy run.

要修复此问题,请运行此命令buildozer android clean,然后使用buildozer android debug重建它或使用buildozer android debug deploy run自动运行。

And also this link might help.

此链接也可能有所帮助。

#2


Looks like you've just made a new ios/apk package. It is persisent with buildozer... All you need to do though is

看起来你刚刚制作了一个新的ios / apk包。对buildozer很有信心......你需要做的就是

buildozer android update
buildozer android release

#1


To fix this issue run this command buildozer android clean and then rebuild it using buildozer android debug or automatically run using buildozer android debug deploy run.

要修复此问题,请运行此命令buildozer android clean,然后使用buildozer android debug重建它或使用buildozer android debug deploy run自动运行。

And also this link might help.

此链接也可能有所帮助。

#2


Looks like you've just made a new ios/apk package. It is persisent with buildozer... All you need to do though is

看起来你刚刚制作了一个新的ios / apk包。对buildozer很有信心......你需要做的就是

buildozer android update
buildozer android release