从Python / Kivy源代码

时间:2015-05-06 16:25:53

标签: android python kivy

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

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

获得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

提前感谢您的帮助。

2 个答案:

答案 0 :(得分:0)

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

this link也可能会有所帮助。

答案 1 :(得分:0)

看起来你刚刚制作了一个新的ios / apk包。 与buildozer相关......你需要做的只是

buildozer android update
buildozer android release