【发布时间】:2019-04-16 12:20:28
【问题描述】:
我正在尝试在我的其他问题上取得一些进展 --> Kivy Launcher - AttributeError: ‘MyInputs’ object has no attribute ‘get_focus_next’
我现在的意图是构建 Kivy Launcher(欢迎提出关于如何制作 android python 应用程序原型的替代建议,但无论如何我仍然想完成这个)。但是,我遇到了新的障碍。 Python-for-android 在构建过程中一直失败,具体如下所示。
构建命令:
p4a apk --requirements=python2,kivy --permission WRITE_EXTERNAL_STORAGE --name="R Kivy Launcher" --package=com.kivy.rkivylauncher --version=0.0.1 --android_api 28 --bootstrap=pygame --launcher --minsdk 13
错误内容(下面是我认为可能很重要的系统和配置内容):
[INFO]: Building hostpython3 for armeabi-v7a
[INFO]: -> directory context /home/Me/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3
[INFO]: -> directory context /home/Me/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build
[INFO]: -> running configure
working: checking for dup3... yes raceback (most recent call last):
File "/usr/lib/python3.7/queue.py", line 179, in get
self.not_empty.wait(remaining)
File "/usr/lib/python3.7/threading.py", line 288, in wait
raise RuntimeError("cannot wait on un-acquired lock")
RuntimeError: cannot wait on un-acquired lock
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/p4a", line 10, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/pythonforandroid/toolchain.py", line 1075, in main
ToolchainCL()
File "/usr/lib/python3.7/site-packages/pythonforandroid/toolchain.py", line 577, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/usr/lib/python3.7/site-packages/pythonforandroid/toolchain.py", line 151, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/usr/lib/python3.7/site-packages/pythonforandroid/toolchain.py", line 200, in build_dist_from_args
build_recipes(build_order, python_modules, ctx)
File "/usr/lib/python3.7/site-packages/pythonforandroid/build.py", line 562, in build_recipes
recipe.build_arch(arch)
File "/usr/lib/python3.7/site-packages/pythonforandroid/python.py", line 417, in build_arch
sh.Command(join(recipe_build_dir, 'configure')))
File "/usr/lib/python3.7/site-packages/pythonforandroid/logger.py", line 178, in shprint
for line in output:
File "/usr/lib/python3.7/site-packages/sh.py", line 857, in next
chunk = self.process._pipe_queue.get(True, 0.001)
File "/usr/lib/python3.7/queue.py", line 182, in get
return item
File "/usr/lib/python3.7/threading.py", line 244, in __exit__
return self._lock.__exit__(*args)
RuntimeError: release unlocked lock
系统: Cygwin 3.0.3
配置: - Python 3.7 -python-for-android 0.7.1 - 建造者 0.39 - sdk-tools-linux-4333796.zip - android-ndk-r19b-linux-x86_64.zip (是 有 AMD 特定的变体吗?到目前为止,谷歌拒绝...)
很高兴分享更多信息,只是不确定还有什么重要/可能相关。我有一些完全疯狂的怀疑(Cygwin 和线程/锁不兼容?),但这就是我所得到的。
帮助?
【问题讨论】:
-
在上面回答我自己的问题(有点):虽然我现在知道有很多设置要求可以允许直接使用 p4a,但最后我总体上想出了以下内容: