Android使用buildozer编译错误 [英] Android compile error using buildozer

查看:35
本文介绍了Android使用buildozer编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 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):

  1. 运行 ~/.buildozer/android/platform/android-sdk-21/tools/android 以启动 Android SDK Manager.(如果您有不同的 SDK 版本,请将 android-sdk-21 替换为相应的文件夹)
  2. 点击窗口底部的Deselect All链接,并选中Android SDK Build-tools -- 20"旁边的复选框.(注意:确切的版本无关紧要,只需选择可用的最新版本即可.)
  3. 点击Install 1 package...按钮.
  4. 单击接受许可,然后单击安装按钮.
  5. 关闭 SDK 管理器并继续使用 buildozer.
  1. Run ~/.buildozer/android/platform/android-sdk-21/tools/android to launch the Android SDK Manager. (If you have a different SDK version, replace android-sdk-21 with the appropriate folder)
  2. 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.)
  3. Click the Install 1 package... button.
  4. Click Accept License and then click the Install button.
  5. Close the SDK Manager and resume working with buildozer.

这篇关于Android使用buildozer编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆