-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Android build fails when building with NDK 22 #19500
Copy link
Copy link
Closed
Description
System information (version)
- OpenCV => latest
- Operating System / Platform => Android
- Compiler => Android NDK 22
Detailed description
Build fails with errors like:
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /Users/gilespayne/Library/Android/sdk/ndk/22.0.7026061.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
….
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':opencv'.
> java.lang.NullPointerException (no error message)
Steps to reproduce
Attempt to build OpenCV for Android with:
./opencv/platforms/android/build_sdk.py --use_android_buildtools --no_samples_build --debug --config ./opencv/platforms/android/ndk-18-api-level-21.config.py
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
Updating the version of ANDROID_GRADLE_PLUGIN_VERSION and the version of Gradle fixes this - I will submit a PR for that
Reactions are currently unavailable