Undefined Modules When Switching To A Newer Version Of Android Ndk
Solution 1:
Assuming you didn't copy the full error message and it actually said "depends on undefined modules", check the release notes:
Module builds will now fail if they have any missing dependencies. To revert to the old behavior, set APP_ALLOW_MISSING_DEPS=true. See https://github.com/android-ndk/ndk/issues/208.
liblog
shouldn't be in LOCAL_SHARED_LIBRARIES
. You want LOCAL_LDLIBS := -llog
instead. Although, actually, if this warning is firing but your project was building you're not using it anyway.
libjpeg
and libpng
don't appear to be defined in your project. Just remove them since they can't have been used anyway.
Solution 2:
Met similar error with OpenCV Android SDK 3.1 which missing opencv_legacy module
/home/jenkins/android-ndk-r15c/build/core/build-binary.mk:688: Android NDK: Module TestProject depends on undefined modules: opencv_legacy
Add the following line to the src/main/jni/Application.mk resolve the problem, thanks @Dan Albert
APP_ALLOW_MISSING_DEPS=true
Solution 3:
I also got this error, but for a different reason.
The build environment was hosted on Windows, and the project being build was in a deep directory. Due to Windows path size limitation, it was not possible to find the necessary module.
So I solved it building the project in a high level path (such as D:\), to make sure the path sizes wouldn't be a problem.
Post a Comment for "Undefined Modules When Switching To A Newer Version Of Android Ndk"