Closed AndreMiras closed 2 years ago
Sorry how did you solved the problem, I am currently having the same issue with the following logs
abe542@abe542-VirtualBox:~/Documents/KivyHelloWorld$ p4a aab --private . --package=org.example.myabb --name="My abb" --version=0.0.1 --bootstrap=sdl2 --requirements=hostpython3==3.7.5,python3==3.7.5,kivy==master --permission=INTERNET --sdk-dir=$HOME/Documents/android/sdk_new/ --android_api 29 --ndk-dir=/home/abe542/Documents/android/android-ndk-r20b-linux-x86_64/android-ndk-r20b --ndk-api 27 --arch=arm64-v8a --arch=armeabi-v7a --release
[INFO]: Recipe hostpython3: version "3.7.5" requested
[INFO]: Recipe python3: version "3.7.5" requested
[INFO]: Recipe kivy: version "master" requested
[WARNING]: $ANDROIDNDKVER is deprecated and no longer necessary, the value you set is ignored
[INFO]: Will compile for the following archs: arm64-v8a, armeabi-v7a
[INFO]: Getting Android API version from user argument: 29
[INFO]: Available Android APIs are (27, 29)
[INFO]: Requested API target 29 is available, continuing.
[INFO]: Getting NDK dir from from user argument
[INFO]: Found NDK version 20b
[INFO]: Getting NDK API version (i.e. minimum supported API) from user argument
[WARNING]: sysroot doesn't exist: /home/abe542/Documents/android/android-ndk-r20b-linux-x86_64/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/sysroot
[WARNING]: Could not find any toolchain for aarch64-linux-android!
Traceback (most recent call last):
File "/home/abe542/.local/bin/p4a", line 8, in <module>
sys.exit(main())
File "/home/abe542/.local/lib/python3.7/site-packages/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/abe542/.local/lib/python3.7/site-packages/pythonforandroid/toolchain.py", line 728, in __init__
getattr(self, command)(args)
File "/home/abe542/.local/lib/python3.7/site-packages/pythonforandroid/toolchain.py", line 144, in wrapper_func
user_ndk_api=self.ndk_api)
File "/home/abe542/.local/lib/python3.7/site-packages/pythonforandroid/build.py", line 447, in prepare_build_environment
self.sdk_dir, self.ndk_dir, arch, ndk_sysroot_exists, py_platform
File "/home/abe542/.local/lib/python3.7/site-packages/pythonforandroid/build.py", line 90, in select_and_check_toolchain_version
toolchain_version=toolchain_version,
UnboundLocalError: local variable 'toolchain_version' referenced before assignment
The command that i am running is
p4a aab --private . --package=org.example.myabb --name="My abb" --version=0.0.1 --bootstrap=sdl2 --requirements=hostpython3==3.7.5,python3==3.7.5,kivy==master --permission=INTERNET --sdk-dir=$HOME/Documents/android/sdk_new/ --android_api 29 --ndk-dir=/home/abe542/Documents/android/android-ndk-r20b-linux-x86_64/android-ndk-r20b --ndk-api 27 --arch=arm64-v8a --arch=armeabi-v7a --release
I know it is due the NDK and SDK configuration but, suspect it might be because of the arch parameters but I really dont know what i am doing wrong
Though the sdk dir and ndk dir are correct
Closing as this has been silently fixed on our develop
branch.
Feel free to re-open if you're able to reproduce it on develop
branch.
@rayzchen I will directly reply on #2585 about termux-related issue.
Versions
Description
Building a the apps (in this case
testapps/on_device_unit_tests
) fails with aUnboundLocalError
when the NDK directory doesn't exist.Exact command used was:
Logs
The fix is actually simple, but I would like it to be cover tested