我尝试在buildozer中构建应用程序,并收到此错误。不知道这是因为buildozer编译时使用python 2.7(何时应使用3.6)还是因为我需要在python包中的存档中编辑某些行(在此页面中搜索我的错误,发现了类似的情况,但不等于)
错误是
>
joel@joel-N68S3:~/apps/prueba$ buildozer -v android debug
Check configuration tokens
Ensure build layout
Check configuration tokens
Read available permissions from api-versions.xml
Preparing build
Check requirements for android
Run 'dpkg --version'
Cwd None
Programa de gestión de paquetes de Debian `dpkg' versión 1.19.0.5 (amd64).
Esto es software libre; consulte la Licencia Pública General de GNU versión
2 o posterior para conocer las condiciones de copia. No hay NINGUNA
garantía.
Search for Git (git)
-> found at /usr/bin/git
Search for Cython (cython)
-> found at /home/joel/.local/bin/cython
Search for Java compiler (javac)
-> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
Search for Java keytool (keytool)
-> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
Install platform
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in <module>
load_entry_point('buildozer==0.35', 'console_scripts', 'buildozer')()
File "/usr/local/lib/python2.7/dist-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 1059, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 92, in run_commands
func(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 102, in cmd_debug
self.buildozer.prepare_for_build()
File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 176, in prepare_for_build
self.target.install_platform()
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 467, in install_platform
self._install_p4a()
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 524, in _install_p4a
deps = re.findall("^install_reqs = (\[[^\]]*\])", setup, re.DOTALL | re.MULTILINE)[0]
IndexError: list index out of range
<< / p>
我的环境中的数据:
joel@joel-N68S3:~/apps/prueba$ python --version
Python 2.7.15rc1
joel@joel-N68S3:~/apps/prueba$ buildozer --version
Check configuration tokens
Buildozer 0.35
最后,代码(它是一个简单的应用程序)在Kivy中正确运行。
以防万一:
Main.py:
import kivy
kivy.require ('1.9.0')
#
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
#
class Contenedor_01(BoxLayout):
None
#
class MainApp(App):
title= "nuevo"
def build(self):
return Contenedor_01()
#
if __name__ == '__main__':
MainApp().run()
#
main.kv:
<Contenedor_01>:
Button:
text: 'nada'
#
Button:
text: 'adios'
感谢所有问候