简体   繁体   中英

android - [linphone] couldn't find “libgnustl_shared.so”

I have some error when installing linphone from https://github.com/BelledonneCommunications/linphone-android

it look like this :

08-29 10:33:39.705 14701-14701/? E/AndroidRuntime: FATAL EXCEPTION: main Process: org.linphone, PID: 14701 java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.linphone-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]] couldn't find "libgnustl_shared.so" at java.lang.Runtime.loadLibrary(Runtime.java:367) at java.lang.System.loadLibrary(System.java:988) at org.linphone.core.LinphoneCoreFactoryImpl.(LinphoneCoreFactoryImpl.java:47) at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:309) at java.lang.Class.forName(Class.java:273) at org.linphone.core.LinphoneCoreFactory.instance(LinphoneCoreFactory.java:47) at org.linphone.LinphoneService.onCreate(LinphoneService.java:305) at android.app.ActivityThread.handleCreateService(ActivityThread.java:3020) at android.app.ActivityThread.access$1800(ActivityThread.java:182) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557) at android.os.Handler.dispatchMessage( Handler.java:111) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5662) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

did someone have to solve the problem before ? or have any sourcecode which can running in android studio correctly ? thankyou

It's because linphone built do not include 64bit lib. So When you install an APK on Android, the system will look for native libraries directories (armeabi, armeabi-v7a, arm64-v8a, x86, x86_64, mips64, mips) inside the lib folder of the APK, in the order determined by Build.SUPPORTED_ABIS.

If your app happen to have an arm64-v8a directory with missing libs, the missing libs will not be installed from another directory, the libs aren't mixed. That means you have to provide the full set of your libraries for each architecture.

So, to solve your issue, you can remove your 64-bit libs from your build, or set abiFilters to package only 32-bit architectures:

android {
....
defaultConfig {
    ....
    ndk {
        abiFilters "armeabi", "armeabi-v7a", "x86"
    }
}

}

this is in the case you have those librairies in your project. you can adapt it according to your project. for more information look at: How to use 32-bit native libraries on 64-bit Android device you can look at this link.

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