简体   繁体   中英

Android Native libraries conflict

I have a native library the armeabi arch in my project that I want to package with the apk. When I add this under jniLibs and compile the app everything works fine. But when I add a 3rd party library to my app, it adds its own .so file to the apk that replaces mine. This .so is for the arm64 arch and is completely different from the one i'm trying to add.

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. I have tried adding it directly to the jniLibs as well as adding it to the libs folder and tryig to compile from there. But all trials lead to the same outcome.

The 2 libraries in question are:

  • libcom_googlecode_android_scripting.so(armeabi)

  • libjingle_peerconnection.so(arm64) .

It is weird to hear

it adds its own .so file to the apk that replaces mine.

But, maybe you are seeing an ABI fallback issue because your two .so libs are different architectures.

The 2 libraries in question are:

libcom_googlecode_android_scripting.so( armeabi )

libjingle_peerconnection.so( arm64 ) .

So, maybe you can try to compile the both architectures to avoid ABI fallback from primary ABI to secondary ABI. See: Android Platform ABI support

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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