Buildozer命令失败

时间:2014-06-06 01:28:14

标签: android python kivy

所以我试图用Buildozer将一个简单的程序部署到我的Galaxy S5。我运行buildozer --verbose android debug deploy run,直到最后一部分就好了:

Traceback (most recent call last):
  File "build.py", line 491, in <module>
    make_package(args)
  File "build.py", line 354, in make_package
    subprocess.check_call([ANT, arg])
  File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1
# Command failed: /usr/bin/python build.py --name 'School Organized' --version 1.2.0 --    package org.test.schoolorganized --private /home/jolechiw/School-Organized/.buildozer/android/app --sdk 14 --minsdk 8 --orientation landscape debug

可以找到输出的最后一部分here。我真的不明白“命令失败”出了什么问题,但它可能是一个路径错误?我真的不确定。

编辑:

我不知道这是否重要,但该应用的源代码是here

2 个答案:

答案 0 :(得分:0)

我相信,我最近遇到了同样的问题,而且我很确定问题实际上是我应用的名称

我认为你的名字'School Organized'中没有空格。尝试删除该内容或将其替换为buildozer.spec文件中的下划线(或其他) ,然后重新构建。

我真的没有办法检查这绝对是和我一样的错误,但它至少非常相似,而且这个调整肯定会修复它。

答案 1 :(得分:0)

今天我遇到了同样的建筑问题。问题出在Java本身而不是构建器中。

必须使用 Java 7 完成:

piotr@jnlk ~/Kivy/SomeApp $ which java
/usr/bin/java

piotr@jnlk ~/Kivy/SomeApp $ java -version
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

piotr@jnlk ~/Kivy/SomeApp $ buildozer android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
(...)
# Distribution already compiled, pass.
# Build the application #137
# Package the application
# Command failed: /usr/bin/python2 build.py (...) --orientation landscape debug

使用Java8构建失败,但是当我将JAVA_HOME变量更改为Java7的位置时:

piotr@jnlk ~/Kivy/SomeApp $ export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
piotr@jnlk ~/Kivy/SomeApp $ export PATH=${JAVA_HOME}/bin:${PATH}

piotr@jnlk ~/Kivy/SomeApp $ java -version
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1~0.13.10.1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

piotr@jnlk ~/Kivy/SomeApp $ buildozer android debug
piotr@jnlk ~/Kivy/SomeApp $ buildozer android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
(...)
# Android packages installation done.
# Check application requirements
# Check garden requirements
# Compile platform
# Distribution already compiled, pass.
# Build the application #138
# Package the application
# Android packaging done!
# APK <some-app-name>.apk available in the bin directory

建筑成功完成:)