android - [linphone]无法找到" libgnustl_shared.so"

时间:2017-08-29 03:38:16

标签: java android c++ libstdc++ linphone

https://github.com/BelledonneCommunications/linphone-android

安装linphone时出错 它看起来像这样:

08-29 10:33:39.705 14701-14701 /? E / AndroidRuntime:致命异常:主要                                                    处理: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]]] 无法找到" libgnustl_shared.so"                                                        在java.lang.Runtime.loadLibrary(Runtime.java:367)                                                        在java.lang.System.loadLibrary(System.java:988)                                                        在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)                                                        在org.linphone.core.LinphoneCoreFactory.instance(LinphoneCoreFactory.java:47)                                                        在org.linphone.LinphoneService.onCreate(LinphoneService.java:305)                                                        在android.app.ActivityThread.handleCreateService(ActivityThread.java:3020)                                                        在android.app.ActivityThread.access $ 1800(ActivityThread.java:182)                                                        在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1557)                                                        在android.os.Handler.dispatchMessage(Handler.java:111)                                                        在android.os.Looper.loop(Looper.java:194)                                                        在android.app.ActivityThread.main(ActivityThread.java:5662)                                                        at java.lang.reflect.Method.invoke(Native Method)                                                        在java.lang.reflect.Method.invoke(Method.java:372)                                                        在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:960)                                                        在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

有人必须先解决问题吗?或者有任何可以在android studio中正确运行的源代码?三江源

1 个答案:

答案 0 :(得分:1)

这是因为内置的linphone不包含64位lib。 因此,当您在Android上安装APK时,系统将按照Build确定的顺序在APK的lib文件夹中查找本机库目录(armeabi,armeabi-v7a,arm64-v8a,x86,x86_64,mips64,mips) .SUPPORTED_ABIS。

如果您的应用程序碰巧有一个缺少libs的arm64-v8a目录,则不会从另一个目录安装缺少的lib,libs不会混合。这意味着您必须为每个体系结构提供完整的库集。

因此,要解决您的问题,您可以从构建中删除64位库,或者将abiFilters设置为仅打包32位架构:

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

}

如果您的项目中有这些库,那就是这种情况。你可以根据你的项目进行调整。 有关更多信息,请查看:How to use 32-bit native libraries on 64-bit Android device 你可以看看这个链接。