1

我们使用 centrifuge lib 与 Sockets 进行通信。一切正常,但这段代码:

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)
4

0 回答 0