我正在努力用buildozer和kivy构建应用程序。 我的应用程序有三个要求:请求,kivy和日期时间。 直接构建应用程序时,我收到以下错误:
# Install distribute
# Run 'curl http://python-distribute.org/distribute_setup.py | venv/bin/python'
# Cwd /home/USER/python/ZugGit/ZugAppFahrt/.buildozer
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
# Install requirement requests in virtualenv
# Run 'pip install --download-cache=/home/USER/.buildozer/cache --target=/home/USER/python/ZugGit/ZugAppFahrt/.buildozer/applibs requests'
# Cwd /home/USER/python/ZugGit/ZugAppFahrt/.buildozer
Usage:
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...
no such option: --download-cache
# Command failed: pip install --download-cache=/home/USER/.buildozer/cache --target=/home/USER/python/ZugGit/ZugAppFahrt/.buildozer/applibs requests
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
我已经阅读了很多内容,发现问题出现在--download-cache命令中。
所以我从buildozer文件夹中的 init .py文件中删除了这部分,但现在我收到以下错误:
# Cwd /home/USER/python/ZugGit/ZugAppFahrt/.buildozer
Directory '/home/USER/python/ZugGit/ZugAppFahrt/.buildozer/applibs' is not installable. File 'setup.py' not found.
# Command failed: pip install --target=/home/USER/.buildozer/cach/home/USER/python/ZugGit/ZugAppFahrt/.buildozer/applibs
我对此完全陌生,无法弄清问题是什么。我可以做什么,我的应用程序正确构建。如果我构建应用程序而不仅仅是以kivy为要求,那么应用程序已经构建,但由于缺少请求而在开始时崩溃。
非常感谢任何帮助。
编辑:问题是我通过删除“--download-cache”部分引入了一个空格。
但是我遇到了一个新问题。现在我收到以下错误:
BUILD FAILED
/home/USER/.buildozer/android/platform/android-sdk-20/tools/ant/build.xml:377: SDK Platform Tools component is missing. Please install it with the SDK Manager (tools/android)
Traceback (most recent call last):
File "build.py", line 517, in <module>
make_package(args)
File "build.py", line 365, in make_package
subprocess.check_call([ANT, arg])
File "/usr/lib64/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1
# Command failed: /usr/bin/python3 build.py --name ZugFart --version 0.1 --package org.zugfart.fart --private "/home/USER/python/ZugGit/ZugAppFahrt/.buildozer/android/app" --sdk 19 --minsdk 9 --permission INTERNET --orientation portrait debug
有趣的是,我在buildozer中引入了一个新的错误,因为我也无法在没有要求的情况下构建应用程序。