UnsatisfiedLinkError UnsatisfiedLinkError报错的问题

今天用七牛云集成Demo碰见了一个错误:具体错误如下

java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.huayu.android.demoframe-2/lib/x86/libpldroidplayer.so: has text relocations

at java.lang.Runtime.loadLibrary(Runtime.java:372)

at java.lang.System.loadLibrary(System.java:1076)
at com.pili.pldroid.player.SharedLibraryNameHelper.a(SharedLibraryNameHelper.java:57)
at com.pili.pldroid.player.PLMediaPlayer$1.loadLibrary(PLMediaPlayer.java:143)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.loadLibrariesOnce(IjkMediaPlayer.java:185)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.initPlayer(IjkMediaPlayer.java:229)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.(IjkMediaPlayer.java:225)
at com.pili.pldroid.player.PLMediaPlayer.a(PLMediaPlayer.java:137)
at com.pili.pldroid.player.PLMediaPlayer.(PLMediaPlayer.java:130)
at com.xxx.PLMediaPlayerActivity.prepare(PLMediaPlayerActivity.java:205)
at com.xxxy.PLMediaPlayerActivity.access$000(PLMediaPlayerActivity.java:31)
at com.xxxx.PLMediaPlayerActivity$1.surfaceCreated(PLMediaPlayerActivity.java:240)
at android.view.SurfaceView.updateWindow(SurfaceView.java:582)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:177)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2055)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:606)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


java.lang.UnsatisfiedLinkError: No implementation found for void tv.danmaku.ijk.media.player.IjkMediaPlayer.native_finalize() (tried Java_tv_danmaku_ijk_media_player_IjkMediaPlayer_native_1finalize and Java_tv_danmaku_ijk_media_player_IjkMediaPlayer_native_1finalize__)
                                                                         at tv.danmaku.ijk.media.player.IjkMediaPlayer.native_finalize(Native Method)
                                                                         at tv.danmaku.ijk.media.player.IjkMediaPlayer.finalize(IjkMediaPlayer.java:960)
                                                                         at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:202)
                                                                         at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:185)
                                                                         at java.lang.Thread.run(Thread.java:818)

表现就是:一直停在loading页面.播放不了视频.

看到第二个错误,以为是.so文件导入错误,然后重新导入了一遍,还是不管用,然后百度了好多,终于:

点击打开链接

其实就是你的targetSdkVersion太高了,高过了.so文件的版本,降低版本就可以解决这个问题.

你可能感兴趣的:(UnsatisfiedLinkError UnsatisfiedLinkError报错的问题)