Android Studio4 用cmake引用第三方打好包的动态库so文件。

网上找了好久,没到的合适的,后来路上用手机看,居然找到一个不错的,分享出来:

https://blog.csdn.net/Xiongjiayo/article/details/85340121

 

我打包的时候,有报错

Build command failed.
Error while executing process D:\sdk\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C C:\Users\Administrator\AndroidStudioProjects\MyApplication7\app\.cxx\cmake\debug\arm64-v8a native-lib}
ninja: Entering directory `C:\Users\Administrator\AndroidStudioProjects\MyApplication7\app\.cxx\cmake\debug\arm64-v8a'

ninja: error: 'C:/Users/Administrator/AndroidStudioProjects/MyApplication7/app/src/main/jniLibs/arm64/libghttp.so', needed by 'C:/Users/Administrator/AndroidStudioProjects/MyApplication7/app/build/intermediates/cmake/debug/obj/arm64-v8a/libnative-lib.so', missing and no known rule to make it

后来,我把jniLibs目录下的arm64-v8a改名为arm64就编译通过了。完美。

 

posted on 2020-09-20 23:30  angelshelter  阅读(1957)  评论(0编辑  收藏  举报

导航