buildozer: ValueError: Tried to access ndk_ver but it has not been set - this should not happen, something went wrong!
- Python: 2.7
- OS: Ubuntu 16
- Buildozer: tried dev (up-to-date) & stable
Description
I’m trying to deploy my app with buildozer android deploy
and buildozer android debug
but I keep getting the same error no matter what settings I use. I tried:
p4a.source_dir = ~/p4a
p4a.bootstrap = sdl2
p4a.branch = master
android.api = 27
android.minapi = 21
android.sdk = 23
android.ndk = 17c
android.arch = armeabi-v7a
I also tried commenting out the the android. ...
but neither solved my problem. Does anyone know what the error message means? Thank you in advance!
Logs
[INFO]: Requested API target 27 is available, continuing.
[INFO]: Found NDK dir in $ANDROIDNDK: /home/pl/.buildozer/android/platform/android-ndk-r17c
[WARNING]: Android NDK version could not be found. This probablywon't cause any problems, but if necessary you canset it with `--ndk-version=...`.
[INFO]: Getting NDK API version (i.e. minimum supported API) from user argument
Traceback (most recent call last):
File "/home/pl/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/home/pl/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/pl/p4a/pythonforandroid/toolchain.py", line 1035, in <module>
main()
File "/home/pl/p4a/pythonforandroid/toolchain.py", line 1031, in main
ToolchainCL()
File "/home/pl/p4a/pythonforandroid/toolchain.py", line 551, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/pl/p4a/pythonforandroid/toolchain.py", line 142, in wrapper_func
user_ndk_api=self.ndk_api)
File "pythonforandroid/build.py", line 376, in prepare_build_environment
info('Using {} NDK {}'.format(self.ndk.capitalize(), self.ndk_ver))
File "pythonforandroid/build.py", line 147, in ndk_ver
raise ValueError('Tried to access ndk_ver but it has not '
ValueError: Tried to access ndk_ver but it has not been set - this should not happen, something went wrong!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15
Yes, that means you’re on the right version 😆
The fix for that can be found here:
https://github.com/kivy/python-for-android/pull/1809
@Petar-Luketina The problem was with python-for-android so make sure you updated your repo, or comment out
p4a.source_dir = ~/p4a
and let buildozer download p4a for you.Also make sure you deleted the . buildozer folder before building again 😃