Android学习笔记----天地图API开发之UnsatisfiedLinkError

由于在jniLibs目录下移除了x86的相关so文件,后来又因为需要在PC模拟器上调试,将该文件夹恢复后,增加了天地图的sdk,却忘记将libMapEngine.so文件同时拷贝至x86目录下,导致如下错误:

07-11 06:50:02.684    2092-2092/com.yeahgis.dczs E/art﹕ No implementation found for int com.tianditu.maps.AndroidJni.initcallback(java.lang.Object, android.graphics.Bitmap) (tried Java_com_tianditu_maps_AndroidJni_initcallback and Java_com_tianditu_maps_AndroidJni_initcallback__Ljava_lang_Object_2Landroid_graphics_Bitmap_2)
07-11 06:50:02.684    2092-2092/com.yeahgis.dczs D/AndroidRuntime﹕ Shutting down VM
07-11 06:50:02.685    2092-2092/com.yeahgis.dczs E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.yeahgis.dczs, PID: 2092
    java.lang.UnsatisfiedLinkError: No implementation found for int com.tianditu.maps.AndroidJni.initcallback(java.lang.Object, android.graphics.Bitmap) (tried Java_com_tianditu_maps_AndroidJni_initcallback and Java_com_tianditu_maps_AndroidJni_initcallback__Ljava_lang_Object_2Landroid_graphics_Bitmap_2)
            at com.tianditu.maps.AndroidJni.initcallback(Native Method)
            at com.tianditu.maps.e.a(VecMapView.java:79)
            at com.tianditu.android.b.o.onSizeChanged(TileView.java:316)
            at android.view.View.sizeChange(View.java:15703)
            at android.view.View.setFrame(View.java:15676)
            at android.view.View.layout(View.java:15592)
            at com.tianditu.android.maps.MapView.onLayout(MapView.java:393)
            at android.view.View.layout(View.java:15596)
            at android.view.ViewGroup.layout(ViewGroup.java:4966)
            at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076)
            at android.view.View.layout(View.java:15596)
            at android.view.ViewGroup.layout(ViewGroup.java:4966)
            at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
            at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
            at android.view.View.layout(View.java:15596)
            at android.view.ViewGroup.layout(ViewGroup.java:4966)
            at android.support.v7.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:502)
            at android.view.View.layout(View.java:15596)
            at android.view.ViewGroup.layout(ViewGroup.java:4966)
            at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
            at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
            at android.view.View.layout(View.java:15596)
            at android.view.ViewGroup.layout(ViewGroup.java:4966)
            at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
            at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
            at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
            at android.view.View.layout(View.java:15596)
            at android.view.ViewGroup.layout(ViewGroup.java:4966)
            at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
            at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
            at android.view.View.layout(View.java:15596)
            at android.view.ViewGroup.layout(ViewGroup.java:4966)
            at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2072)
            at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1829)
            at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
            at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
            at android.view.Choreographer.doCallbacks(Choreographer.java:580)
            at android.view.Choreographer.doFrame(Choreographer.java:550)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

这是因为jni库没有找到其封装的so文件导致,将so文件恢复即可。

但是突然发现天地图竟然没有提供x86环境下的libMapEngine.so文件,不知道官方到底咋想的。。。

 

你可能感兴趣的:(Android学习)