1、java.lang.UnsatisfiedLinkError: method:logWrite, sig:(Lcom/tencent/mars/xlog/Xlog$XLoggerInfo;Ljava/lang/String;)V
完整错误日志如下:
java.lang.UnsatisfiedLinkError: method:logWrite, sig:(Lcom/tencent/mars/xlog/Xlog$XLoggerInfo;Ljava/lang/String;)V
at java.lang.Runtime.nativeLoad(Native Method)
at java.lang.Runtime.nativeLoad(Runtime.java:1115)
at java.lang.Runtime.loadLibrary0(Runtime.java:1069)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(System.java:1668)
at d.a.a.a.j.<clinit>(SourceFile:240)
at d.a.a.a.j.j(SourceFile:246)
at com.hl.demo.Appapplication.onCreate(SourceFile:43)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1202)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7588)
at android.app.ActivityThread.access$2600(ActivityThread.java:260)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2435)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
检查是否项目开启了混淆,导致native方法及所在类被混淆,而找不到对应的方法。
2、java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.PeerConnectionFactory.nativeInitializeAndroidGlobals() (tried Java_org_webrtc_PeerConnectionFactory_nativeInitializeAndroidGlobals and Java_org_webrtc_PeerConnectionFactory_nativeInitializeAndroidGlobals__)
完整日志如下:
java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.PeerConnectionFactory.nativeInitializeAndroidGlobals() (tried Java_org_webrtc_PeerConnectionFactory_nativeInitializeAndroidGlobals and Java_org_webrtc_PeerConnectionFactory_nativeInitializeAndroidGlobals__)
org.webrtc.PeerConnectionFactory.nativeInitializeAndroidGlobals(PeerConnectionFactory.java:0)
org.webrtc.PeerConnectionFactory.initialize(PeerConnectionFactory.java:273)
com.mi.webrtc.WebRTCManager.initPeerFactory(WebRTCManager.java:189)
com.mi.webrtc.WebRTCManager.connection(WebRTCManager.java:173)
com.mi.webrtc.WebRTCSDK.connection(WebRTCSDK.java:35)
com.mi.cameracoreiml.b.a(SourceFile:2)
com.mi.cameracoreiml.b$b.onSuccess(SourceFile:57)
com.mi.support.c$a.invoke(SourceFile:37)
com.mi.support.b.onSuccess(SourceFile:1)
com.hualai.http.HttpCallback.onResponse(HttpCallback.kt:22)
retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$retrofit2-DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:89)
retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1$$ExternalSyntheticLambda0.run(:6)
android.os.Handler.handleCallback(Handler.java:873)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6825)
java.lang.reflect.Method.invoke(Method.java:0)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:860)
参考文章:
java.lang.UnsatisfiedLinkError: No implementation found for_weixin_小栓的博客-CSDN博客
3、java.lang.UnsatisfiedLinkError: dlopen failed: library "libsimple-player.so" not found
完整日志如下:
java.lang.UnsatisfiedLinkError: dlopen failed: library "libsimple-player.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
at java.lang.System.loadLibrary(System.java:1664)
at com.mi.media.SimplePlayer.<clinit>(Unknown Source:2)
at com.mi.media.SimplePlayer$Builder.Build(Unknown Source:0)
at com.mi.media.decoder.CameraPhotoView.initPlayer(CameraPhotoLiveBaseView.java:206)
at com.mi.media.decoder.CameraPhotoView.access$100(CameraPhotoLiveBaseView.java:31)
at com.mi.media.decoder.CameraPhotoView$3.onSurfaceTextureAvailable(CameraPhotoView.java:319)
at android.view.TextureView.getTextureLayer(TextureView.java:402)
at android.view.TextureView.draw(TextureView.java:351)
at android.view.View.updateDisplayListIfDirty(View.java:21226)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.draw(View.java:22353)
at android.view.View.updateDisplayListIfDirty(View.java:21226)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.draw(View.java:22353)
at android.view.View.updateDisplayListIfDirty(View.java:21226)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.draw(View.java:22353)
at com.android.internal.policy.DecorView.draw(DecorView.java:806)
at android.view.View.updateDisplayListIfDirty(View.java:21226)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:559)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:565)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:642)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:4101)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3828)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3099)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:731)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
该报错是由于找不到对应cpu的.so包。例如:项目中只有arm框架的so包,而没有x86的,这时运行在x86框架下就会出现该情况。
找不多so包也会出现如下的报错:文章来源:https://www.toymoban.com/news/detail-641831.html
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.hl.platform-qJggWDnT15fdSwQF0tBXIw==/base.apk"],nativeLibraryDirectories=[/data/app/com.hl.platform-qJggWDnT15fdSwQF0tBXIw==/lib/arm64, /data/app/com.hl.platform-qJggWDnT15fdSwQF0tBXIw==/base.apk!/lib/arm64-v8a, /system/lib64, /hw_product/lib64, /system/product/lib64, /prets/lib64]]] couldn't find "libsssss.so"
完整日志如下:文章来源地址https://www.toymoban.com/news/detail-641831.html
NativeLibrary: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.hl.platform-qJggWDnT15fdSwQF0tBXIw==/base.apk"],nativeLibraryDirectories=[/data/app/com.hl.platform-qJggWDnT15fdSwQF0tBXIw==/lib/arm64, /data/app/com.hl.platform-qJggWDnT15fdSwQF0tBXIw==/base.apk!/lib/arm64-v8a, /system/lib64, /hw_product/lib64, /system/product/lib64, /prets/lib64]]] couldn't find "libsssss.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1067)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(System.java:1668)
at org.webrtc.NativeLibrary$DefaultLoader.load(NativeLibrary.java:25)
at org.webrtc.NativeLibrary.initialize(NativeLibrary.java:48)
at org.webrtc.PeerConnectionFactory.initialize(PeerConnectionFactory.java:274)
at com.mi.webrtc.WebRTCManager.initPeerFactory(WebRTCManager.java:192)
at com.mi.webrtc.WebRTCModel.connect(WebRTModel.java:124)
at retrofit2.-$$Lambda$DefaultCallAdapterFactory$ExecutorCallbackCall$1$3wC8FyV4pyjrzrYL5U0mlYiviZw.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:900)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
到了这里,关于android报java.lang.UnsatisfiedLinkError错误大全的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!