Android 致命异常:java.lang.UnsatisfiedLinkError

Android 致命异常:java.lang.UnsatisfiedLinkError,android,c++,x86,arm,centrifuge,Android,C++,X86,Arm,Centrifuge,我们使用离心机库与套接字通信。一切都很好,但是 此代码: val credentials = Centrifuge.newCredentials( getCurrentUserId(), webSocketToken.timestamp, EMPTY_STRING, webSocketToken.token ) 抛出这个错误,它只发生在基于arm结构的android上。以下是输出: Fata

我们使用离心机库与套接字通信。一切都很好,但是 此代码:

val credentials = Centrifuge.newCredentials(
            getCurrentUserId(),
            webSocketToken.timestamp,
            EMPTY_STRING,
            webSocketToken.token
    )
抛出这个错误,它只发生在基于arm结构的android上。以下是输出:

Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.namba-_dbpnhlp0R3PyG4erhR_2w==/base.apk"],nativeLibraryDirectories=[/data/app/com.namba-_dbpnhlp0R3PyG4erhR_2w==/lib/arm64, /system/lib64, /vendor/lib64]]] couldn't find "libgojni.so"
   at java.lang.Runtime.loadLibrary0 + 1012(Runtime.java:1012)
   at java.lang.System.loadLibrary + 1669(System.java:1669)
   at go.LoadJNI.<clinit> + 23(LoadJNI.java:23)
   at java.lang.Class.classForName(Class.java)
   at java.lang.Class.forName + 453(Class.java:453)
   at java.lang.Class.forName + 378(Class.java:378)
   at go.Seq.<clinit> + 28(Seq.java:28)
   at go.Seq.touch()
   at centrifuge.Centrifuge.<clinit> + 11(Centrifuge.java:11)
   at centrifuge.Centrifuge.newCredentials(Centrifuge.java)
   at com.namba.websocket.CentrifugoWebSocketClient.createClient + 214(CentrifugoWebSocketClient.kt:214)
   at com.namba.websocket.CentrifugoWebSocketClient$initClient$1.invokeSuspend + 145(CentrifugoWebSocketClient.kt:145)
   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith + 32(ContinuationImpl.kt:32)
   at kotlinx.coroutines.DispatchedTask$DefaultImpls.run + 235(Dispatched.kt:235)
   at kotlinx.coroutines.DispatchedContinuation.run + 81(Dispatched.kt:81)
   at kotlinx.coroutines.scheduling.Task.run + 94(Tasks.kt:94)
   at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely + 586(CoroutineScheduler.kt:586)
   at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely + 60(CoroutineScheduler.kt:60)
   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run + 732(CoroutineScheduler.kt:732)
Fatal Exception:java.lang.unsatifiedlinkerror:dalvik.system.PathClassLoader[DexPathList[[zip文件/system/framework/org.apache.http.legacy.boot.jar],zip文件/data/app/com.namba-[u dbpnhlp0r3pyg4erhu 2w=/base.apk],nativeLibraryDirectories=/data/app/com.namba-[u dbpnhlp0r3pyg4erhu 2w=/lib/arm64,/system/lib64]]找不到“libgojni.so”
位于java.lang.Runtime.loadLibrary0+1012(Runtime.java:1012)
位于java.lang.System.loadLibrary+1669(System.java:1669)
在go.LoadJNI+23(LoadJNI.java:23)
位于java.lang.Class.classForName(Class.java)
在java.lang.Class.forName+453处(Class.java:453)
在java.lang.Class.forName+378处(Class.java:378)
在go.Seq.+28(Seq.java:28)
at go.Seq.touch()
在离心机上11(离心机,java:11)
在离心机.离心机.新凭证(离心机.java)
在com.namba.websocket.离心机owebsocketclient.createClient+214(离心机owebsocketclient.kt:214)
在com.namba.websocket.离心机owebsocketclient$initClient$1.invokeSuspend+145(离心机owebsocketclient.kt:145)
在kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+32(ContinuationImpl.kt:32)
在kotlinx.coroutines.DispatchedTask$DefaultImpls.run+235(Dispatched.kt:235)
在kotlinx.coroutines.DispatchedContinuation.run+81处(Dispatched.kt:81)
在kotlinx.coroutines.scheduling.Task.run+94处(Tasks.kt:94)
在kotlinx.coroutines.scheduling.CoroutineScheduler.runsafe+586(CoroutineScheduler.kt:586)
在kotlinx.coroutines.scheduling.CoroutineScheduler.access$runsafe+60(CoroutineScheduler.kt:60)
在kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run+732(CoroutineScheduler.kt:732)

在您的APK中是“…找不到”libgojni.so“…”吗?并为64位Arm构建?@RichardCritten?@RichardCritten在我的APK中是的,但此错误仅在Arm系统中发生。在你的APK中“…找不到”libgojni.so“…”吗?并为64位Arm构建?@RichardCriten?@RichardCriten在我的APK中是的,但此错误仅在Arm系统中发生。