简体   繁体   English

Android本机库冲突

[英]Android Native libraries conflict

I have a native library the armeabi arch in my project that I want to package with the apk. 我的项目中有一个本地库armeabi arch,我想将其与apk打包在一起。 When I add this under jniLibs and compile the app everything works fine. 当我在jniLibs下添加此代码并编译应用程序时,一切正常。 But when I add a 3rd party library to my app, it adds its own .so file to the apk that replaces mine. 但是,当我将第3方库添加到我的应用程序时,它将自己的.so文件添加到替换我的apk中。 This .so is for the arm64 arch and is completely different from the one i'm trying to add. .so用于arm64拱形,与我要添加的拱形完全不同。

Individually both of them work when the other is not present, but when I try to include both only one gets added to the data/app/lib folder. 当两者都不存在时,它们各自都可以工作,但是当我尝试包括两者时,只有一个被添加到data / app / lib文件夹中。 I have tried adding it directly to the jniLibs as well as adding it to the libs folder and tryig to compile from there. 我尝试将其直接添加到jniLibs中,以及将其添加到libs文件夹和tryig中进行编译。 But all trials lead to the same outcome. 但是所有试验都得出相同的结果。

The 2 libraries in question are: 有问题的2个库是:

  • libcom_googlecode_android_scripting.so(armeabi) libcom_googlecode_android_scripting.so(armeabi)

  • libjingle_peerconnection.so(arm64) . libjingle_peerconnection.so(arm64)。

It is weird to hear 听到这很奇怪

it adds its own .so file to the apk that replaces mine. 它将自己的.so文件添加到替换我的apk中。

But, maybe you are seeing an ABI fallback issue because your two .so libs are different architectures. 但是,也许您会看到ABI后备问题,因为您的两个.so库是不同的体系结构。

The 2 libraries in question are: 有问题的2个库是:

libcom_googlecode_android_scripting.so( armeabi ) libcom_googlecode_android_scripting.so( armeabi

libjingle_peerconnection.so( arm64 ) . libjingle_peerconnection.so( arm64 )。

So, maybe you can try to compile the both architectures to avoid ABI fallback from primary ABI to secondary ABI. 因此,也许您可​​以尝试编译两种体系结构,以避免ABI从主ABI降级到辅助ABI。 See: Android Platform ABI support 请参阅: Android平台ABI支持

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM