问候
我是kivy的新手,我想使用buildozer为android编译一个kivy应用程序,但buildozer无法安装android ndk。buildozer使用的链接已经过时,在使用raspbian最新版本时不再可用
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.19.7 (armhf).
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 /home/pi/.local/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-11-openjdk-armhf/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-11-openjdk-armhf/bin/keytool
# Install platform
# Run 'git config --get remote.origin.url'
# Cwd /home/pi/Downloads/New/.buildozer/android/platform/python-for-android
https://github.com/kivy/python-for-android.git
# Run 'git branch -vv'
# Cwd /home/pi/Downloads/New/.buildozer/android/platform/python-for-android
* master 5a94d074 [origin/master] Merge pull request #2244 from Chronolife-team/native_services_upstream
# Run '/usr/bin/python3 -m pip install -q --user 'appdirs' 'colorama>=0.3.3' 'jinja2' 'six' 'enum34; python_version<"3.4"' 'sh>=1.10; sys_platform!="nt"' 'pep517<0.7.0"' 'toml''
# Cwd None
# Apache ANT found at /home/pi/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/pi/.buildozer/android/platform/android-sdk
# Recommended android's NDK version by p4a is: 19c
# Android NDK is missing, downloading
# Downloading https://dl.google.com/android/repository/android-ndk-r19c-linux-x86.zip
Traceback (most recent call last):
File "/home/pi/.local/bin/buildozer", line 10, in <module>
sys.exit(main())
File "/home/pi/.local/lib/python3.7/site-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/home/pi/.local/lib/python3.7/site-packages/buildozer/__init__.py", line 1047, in run_command
self.target.run_commands(args)
File "/home/pi/.local/lib/python3.7/site-packages/buildozer/target.py", line 92, in run_commands
func(args)
File "/home/pi/.local/lib/python3.7/site-packages/buildozer/target.py", line 102, in cmd_debug
self.buildozer.prepare_for_build()
File "/home/pi/.local/lib/python3.7/site-packages/buildozer/__init__.py", line 169, in prepare_for_build
self.target.install_platform()
File "/home/pi/.local/lib/python3.7/site-packages/buildozer/targets/android.py", line 665, in install_platform
self._install_android_ndk()
File "/home/pi/.local/lib/python3.7/site-packages/buildozer/targets/android.py", line 457, in _install_android_ndk
cwd=self.buildozer.global_platform_dir)
File "/home/pi/.local/lib/python3.7/site-packages/buildozer/__init__.py", line 677, in download
urlretrieve(url, filename, report_hook)
File "/usr/lib/python3.7/urllib/request.py", line 1824, in retrieve
block = fp.read(bs)
File "/usr/lib/python3.7/tempfile.py", line 620, in func_wrapper
return func(*args, **kwargs)
ValueError: read of closed file
这是我从终端中得到的错误
据我所知,Raspberry PI硬件不支持它(如果你想,你可以尝试使用RPI(,但我不确定raspbian,无论如何,buildozer中的链接是旧的,所以你必须在这个位置为自己下载NDK。然后将zip解压缩到以下位置:/home/NAME/.buildozer/android/platform
。然后,当您运行该命令时,您应该能够正常运行。