NDK r13升级 r15编译找不到依赖库问题

NDK r13升级到 r15编译问题,报以下错误:

Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK:     current module
/Users/gezhaoyou/Library/Android/sdk/ndk-bundle/build/core/build-binary.mk:688: Android NDK: Module ECMedia depends on undefined modules: webrtc_yuv webrtc_resampler webrtc_spl stlport_static cpufeatures cutils stlport dl
/Users/gezhaoyou/Library/Android/sdk/ndk-bundle/build/core/build-binary.mk:701: *** Android NDK: Aborting (set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies)    .  Stop.

可以看到提示 ECmedia 库依赖于一些未定义的modules : webrtc_yuv webrtc_resampler webrtc_spl stlport_static cpufeatures cutils stlport dl,也就是在 makefile中 LOCAL_WHOLE_STATIC_LIBRARIES所列出的依赖库列表中列出了你没有定义的模块,也就是上面提示的这些。

解决办法:
第一种:把提示的没有定义的库从 LOCAL_WHOLE_STATIC_LIBRARIES的依赖列表里去掉;
第二种:在当前makefile中添加 APP_ALLOW_MISSING_DEPS=true

网上见有朋友在ndk r14 版本中就遇到了这个问题, 看来新版本的ndk 对于Makefile的分析更加严格了,Makefile 还是要认真写。

你可能感兴趣的:(NDK r13升级 r15编译找不到依赖库问题)