我使用buildozer通过以下命令创建apk:
buildozer android debug
但是它发现state.db的权限被拒绝。该文件为@〜/ PycharmProjects / kivyApp / .buildozer / state.db。
我通过chmod +x state.db
更改了安全模式,但没有解决。
结果如下:
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Install platform
# Apache ANT found at /home/amjoshaghani/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/amjoshaghani/.buildozer/android/platform/android-sdk
# Android NDK found at /home/amjoshaghani/.buildozer/android/platform/android-ndk-r17c
# Installing/updating SDK platform tools if necessary
# Updating SDK build tools if necessary
# Downloading platform api target if necessary
# Android packages installation done.
Traceback (most recent call last):
File "/usr/bin/buildozer", line 10, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/lib/python3.7/site-packages/buildozer/__init__.py", line 1044, in run_command
self.target.run_commands(args)
File "/usr/lib/python3.7/site-packages/buildozer/target.py", line 92, in run_commands
func(args)
File "/usr/lib/python3.7/site-packages/buildozer/target.py", line 102, in cmd_debug
self.buildozer.prepare_for_build()
File "/usr/lib/python3.7/site-packages/buildozer/__init__.py", line 178, in prepare_for_build
self.target.install_platform()
File "/usr/lib/python3.7/site-packages/buildozer/targets/android.py", line 612, in install_platform
self._install_android_packages()
File "/usr/lib/python3.7/site-packages/buildozer/targets/android.py", line 578, in _install_android_packages
self.buildozer.state[cache_key] = cache_value
File "/usr/lib/python3.7/site-packages/buildozer/jsonstore.py", line 33, in __setitem__
self.sync()
File "/usr/lib/python3.7/site-packages/buildozer/jsonstore.py", line 51, in sync
with open(self.filename, 'w') as fd:
PermissionError: [Errno 13] Permission denied: '/home/amjoshaghani/PycharmProjects/kivyApp/.buildozer/state.db'