我已经用Kivy制作了Kivy应用程序,并且我想制作一个apk,因此我按照Kivy网站https://kivy.org/doc/stable/guide/packaging-android.html#buildozer的说明尝试使用buildozer。它不起作用,所以我读了很多关于它的论坛,但是没有人回答我,所以我尝试了其他构建过程,但是它们也没有起作用。错误似乎所在的日志是:
[INFO]: Selecting java build tool:
[INFO]: Detected highest available build tools version to be 20.0.0
[INFO]: Building with ant, as the highest build-tools-version is only 20.0.0
[DEBUG]: -> running ant debug
[DEBUG]: Buildfile: /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/platform/build/dists/avion/build.xml
[DEBUG]:
[DEBUG]: -set-mode-check:
[DEBUG]:
[DEBUG]: -set-debug-files:
[DEBUG]:
[DEBUG]: -check-env:
[DEBUG]: [checkenv] Android SDK Tools Revision 24.0.2
[DEBUG]: [checkenv] Installed at /home/arthur/.buildozer/android/platform/android-sdk-20
[DEBUG]:
[DEBUG]: -setup:
[DEBUG]: [echo] Project Name: AvionGame-1.3.2
[DEBUG]: [gettype] Project Type: Application
[DEBUG]:
[DEBUG]: -set-debug-mode:
[DEBUG]:
[DEBUG]: -debug-obfuscation-check:
[DEBUG]:
[DEBUG]: -pre-build:
[DEBUG]:
[DEBUG]: -build-setup:
[DEBUG]: [getbuildtools] Using latest Build Tools: 20.0.0
[DEBUG]: [echo] Resolving Build Target for AvionGame-1.3.2...
[DEBUG]: [gettarget] Project Target: Android 4.4.2
[DEBUG]: [gettarget] API level: 19
[DEBUG]: [echo] ----------
[DEBUG]: [echo] Creating output directories if needed...
[DEBUG]: [mkdir] Created dir: /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/platform/build/dists/avion/bin/rsObj
[DEBUG]: [mkdir] Created dir: /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/platform/build/dists/avion/bin/rsLibs
[DEBUG]: [echo] ----------
[DEBUG]: [echo] Resolving Dependencies for AvionGame-1.3.2...
[DEBUG]: [dependency] Library dependencies:
[DEBUG]: [dependency] No Libraries
[DEBUG]: [dependency]
[DEBUG]: [dependency] ------------------
[DEBUG]: [echo] ----------
[DEBUG]: [echo] Building Libraries with 'debug'...
[DEBUG]: [subant] No sub-builds to iterate on
[DEBUG]:
[DEBUG]: -code-gen:
[DEBUG]: [mergemanifest] Found modified input file
[DEBUG]: [mergemanifest] Merging AndroidManifest files into one.
[DEBUG]: [mergemanifest] Manifest merger disabled. Using project manifest only.
[DEBUG]: [echo] Handling aidl files...
[DEBUG]: [aidl] No AIDL files to compile.
[DEBUG]: [echo] ----------
[DEBUG]: [echo] Handling RenderScript files...
[DEBUG]: [echo] ----------
[DEBUG]: [echo] Handling Resources...
[DEBUG]: [aapt] Found modified input file
[DEBUG]: [aapt] Generating resource IDs...
[DEBUG]: [aapt] (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
[DEBUG]: [echo] ----------
[DEBUG]: [echo] Handling BuildConfig class...
[DEBUG]: [buildconfig] Generating BuildConfig class.
[DEBUG]:
[DEBUG]: -pre-compile:
[DEBUG]:
[DEBUG]: -compile:
[DEBUG]: [javac] Compiling 26 source files to /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/platform/build/dists/avion/bin/classes
[DEBUG]: [javac] error: Source option 5 is no longer supported. Use 6 or later.
[DEBUG]: [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.
[DEBUG]:
[DEBUG]: BUILD FAILED
[DEBUG]: /home/arthur/.buildozer/android/platform/android-sdk-20/tools/ant/build.xml:720: The following error occurred while executing this line:
[DEBUG]: /home/arthur/.buildozer/android/platform/android-sdk-20/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
[DEBUG]:
[DEBUG]: Total time: 1 second
Exception in thread background thread for pid 21240:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/arthur/.local/lib/python2.7/site-packages/sh.py", line 2170, in background_thread
handle_exit_code(exit_code)
File "/home/arthur/.local/lib/python2.7/site-packages/sh.py", line 1929, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/arthur/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
raise exc
ErrorReturnCode_1:
RAN: /home/arthur/.buildozer/android/platform/apache-ant-1.9.4/bin/ant debug
STDOUT:
Buildfile: /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/platform/build/dists/avion/build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 24.0.2
[checkenv] Installed at /home/arthur/.buildozer/android/platform/android-sdk-20
-setup:
[echo] Project Name: AvionGame-1.3.2
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
[echo] Resolving Build Target for AvionGame-1.3.2...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/platform/build/dists/avion/bin/rsObj
[mkdir] Created dir: /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/platform/build/dists/avion/bin/rsLibs
[echo] ----------
[echo] Resolving Dependencies for AvionGame-1.3.2...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] Found modified input file
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Found modified input file
[aapt] Generating resource IDs...
[aapt] (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 26 source files to /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/platform/build/dists/avion/bin/classes
[javac] error: Source option 5 is no longer supported. Use 6 or later.
[javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.
BUILD FAILED
/home/arthur/.buildozer/android/platform/android-sdk-20/tools/ant/build.xml:720: The following error occurred while executing this line:
/home/arthur/.buildozer/android/platform/android-sdk-20/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 1 second
STDERR:
[INFO]: STDOUT (last 20 lines of 68):
[echo] Handling Resources...
[aapt] Found modified input file
[aapt] Generating resource IDs...
[aapt] (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 26 source files to /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/platform/build/dists/avion/bin/classes
[javac] error: Source option 5 is no longer supported. Use 6 or later.
[javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.
BUILD FAILED
/home/arthur/.buildozer/android/platform/android-sdk-20/tools/ant/build.xml:720: The following error occurred while executing this line:
/home/arthur/.buildozer/android/platform/android-sdk-20/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 1 second
[INFO]: STDERR:
[INFO]: COMMAND:
cd /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/platform/build/dists/avion && /home/arthur/.buildozer/android/platform/apache-ant-1.9.4/bin/ant debug
[WARNING]: ERROR: /home/arthur/.buildozer/android/platform/apache-ant-1.9.4/bin/ant failed!
# Command failed: /usr/bin/python2.7 -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name avion --name 'Avion Game' --version 1.3.2 --package org.aaa.avion --android_api 19 --minsdk 9 --private /home/arthur/Bureau/Python/Avions/Kivy/.buildozer/android/app --permission INTERNET --orientation portrait --window --copy-libs --arch armeabi-v7a --color=always --storage-dir="/home/arthur/Bureau/Python/Avions/Kivy/.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
使用~/.buildozer/android/platform/android-sdk-20/tools/android
,我在许多论坛上看到了Android SDK构建工具20,
我在main.py中导入json,会导致错误吗?
您能帮我吗,我开始失去希望...