在检查花园要求后,Buildozer无法编译平台

时间:2019-01-09 19:55:13

标签: android python kivy buildozer

我正在尝试为我用Python 3编写的程序制作一个Android应用。

在此之前,我已经工作并解决了几个问题,但目前不知道是什么导致了该问题。如果您需要其他任何信息来帮助我解决此问题,我们非常乐意添加。

eddie@eddie-VirtualBox:~$ buildozer android debug deploy run
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.19.0.5 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib/jvm/java-11-openjdk-amd64/bin/keytool
# Install platform
# Run "/usr/bin/python3 -m pip install -q --user 'appdirs' 'colorama>=0.3.3' 'jinja2' 'six'"
# Cwd None
# Apache ANT found at /home/eddie/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/eddie/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/eddie/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=What\'s for Dinner? --bootstrap=sdl2 --requirements =python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/eddie/.buildozer/android/platform/build"'
# Cwd /home/eddie/.buildozer/android/platform/python-for-android-new-toolchain
/bin/sh: 1: Syntax error: Unterminated quoted string
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=What's for Dinner? --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/eddie/.buildozer/android/platform/build"
# 
# 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

1 个答案:

答案 0 :(得分:1)

您看到的错误是由与结尾的引号不匹配引起的。

大多数命令行语法要求您转义使用的所有空格。 在Unix系统中,如果文件名为“ Stack Overflow.txt”,要访问该文件,您需要编写

nano Stack\ Overflow.txt

或者:

nano "Stack Overflow.txt"

所以在您的情况下,我假设在这一行

# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=What's for Dinner? --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/eddie/.buildozer/android/platform/build"

晚餐的空间是什么?可能会破坏字符串,导致报价不匹配。我不知道字符串来自哪里。你可以告诉我吗?因为据说引号是转义的,但空格不是。