Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined modules when switching to a newer version of android ndk

I'm attempting to upgrade from ndk-r11c to ndk-r14. When I run r14, I get an error

Android NDK: Module myJNI depends on modules: png jpeg log

In my Android make: LOCAL_SHARED_LIBRARIES := png jpeg log

like image 255
Brendan Cordingley Avatar asked Mar 09 '17 22:03

Brendan Cordingley


1 Answers

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.

like image 74
Dan Albert Avatar answered Nov 10 '22 03:11

Dan Albert