問題描述
我正在嘗試使用 buildozer 編譯一個 .apk(這個).但我不斷收到下面的命令失敗消息.我嘗試使用不同的 python 路徑,重新安裝 buildozer,使用不同的 buildozer 路徑,從 Mac HD 編譯,使用 sudo 編譯,不同的 cython 版本.沒有工作.
I am trying to compile an .apk (this one) using buildozer. But I keep getting the command failed message below. I've tried using a different python path, reinstalling buildozer, using different buildozer paths, compiling from Mac HD, compiling with sudo, a different cython version. None work.
Traceback(最近一次調用最后一次):文件build.py",第 497 行,在make_package(args)make_package 中的文件build.py",第 351 行subprocess.check_call([ANT, arg])文件/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py",第 540 行,在 check_call引發 CalledProcessError(retcode, cmd)subprocess.CalledProcessError: Command '['ant', 'debug']' 返回非零退出狀態 1
Traceback (most recent call last): File "build.py", line 497, in make_package(args) File "build.py", line 351, in make_package subprocess.check_call([ANT, arg]) File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1
命令失敗:/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python build.py --name 'My Application'--version 1.2.0 --package org.test.myapp --private/Users/user/Documents/Py/kvapk/.buildozer/android/app --sdk 14 --minsdk 8 --permission INTERNET --permission ACCESS_NETWORK_STATE--orientation 縱向調試
Command failed: /usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python build.py --name 'My Application' --version 1.2.0 --package org.test.myapp --private /Users/user/Documents/Py/kvapk/.buildozer/android/app --sdk 14 --minsdk 8 --permission INTERNET --permission ACCESS_NETWORK_STATE --orientation portrait debug
我在 OSX Mavericks 上使用 python 2.7.5、kivy 1.8.0、cython 0.19 和 buildozer 0.17
I'm on OSX Mavericks using python 2.7.5, kivy 1.8.0, cython 0.19 and buildozer 0.17
這是總輸出:https://gist.github.com/feynman21/29d2f02c387112f2900b
推薦答案
這是 buildozer 無法安裝 Android 構建工具的問題.希望這將很快得到解決.在此之前,您可以通過手動安裝構建工具 (https://github.com/kivy/buildozer/issues/146#issuecomment-57061269):
This is an issue with buildozer failing to install the Android build-tools. Hopefully this will be fixed soon. Until then, you can work around this by manually installing build-tools (https://github.com/kivy/buildozer/issues/146#issuecomment-57061269):
- 運行
~/.buildozer/android/platform/android-sdk-21/tools/android
以啟動 Android SDK Manager.(如果您有不同的 SDK 版本,請將android-sdk-21
替換為相應的文件夾) - 點擊窗口底部的
Deselect All
鏈接,并選中Android SDK Build-tools -- 20"旁邊的復選框.(注意:確切的版本無關緊要,只需選擇可用的最新版本即可.) - 點擊
Install 1 package...
按鈕. - 單擊
接受許可
,然后單擊安裝
按鈕.李> - 關閉 SDK 管理器并繼續使用 buildozer.
- Run
~/.buildozer/android/platform/android-sdk-21/tools/android
to launch the Android SDK Manager. (If you have a different SDK version, replaceandroid-sdk-21
with the appropriate folder) - Click the
Deselect All
link at the bottom of the window, and check the box next to "Android SDK Build-tools -- 20". (Note: the exact version doesn't matter, just pick the newest version available.) - Click the
Install 1 package...
button. - Click
Accept License
and then click theInstall
button. - Close the SDK Manager and resume working with buildozer.
這篇關于Android使用buildozer編譯錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!