找不到 libimb.so

0 投票
420 浏览

使用产品 :supermap-imobile-9.1.0-153-android-zip-chs

数据类型 :文件型 udb

问题描述:Rejecting re-init on previously-failed class java.lang.Class<com.supermap.mapping.MapControl2>: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cn.xxx-dRiRbkeRToMNPltAUbeJrA==/base.apk"],nativeLibraryDirectories=[/data/app/cn.xxx-dRiRbkeRToMNPltAUbeJrA==/lib/arm, /data/app/cn.xxx-dRiRbkeRToMNPltAUbeJrA==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /product/lib]]] couldn't find "libimb.so"

我只用到了 2d 功能,所以只加了 2d 的库,

这个崩溃是在 我的应用因为其他原因崩溃之后重新启动后出现的。

具体log 如下:


W/System.err: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class <unknown>
W/System.err: Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class <unknown>
W/System.err: Caused by: java.lang.reflect.InvocationTargetException
W/System.err:     at java.lang.reflect.Constructor.newInstance0(Native Method)
W/System.err:     at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
W/System.err:     at android.view.LayoutInflater.createView(LayoutInflater.java:658)
W/System.err:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:801)
W/System.err:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
W/System.err:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:874)
W/System.err:     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:835)
W/System.err:     at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
W/System.err:     at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
W/System.err:     at android.view.ViewStub.inflateViewNoAdd(ViewStub.java:269)
W/System.err:     at android.view.ViewStub.inflate(ViewStub.java:302)
W/System.err:     at cn.xxx.BaseActivity.initContentView(BaseActivity.java:251)
W/System.err:     at cn.xxx.BaseActivity.onCreate(BaseActivity.java:103)
W/System.err:     at android.app.Activity.performCreate(Activity.java:7343)
W/System.err:     at android.app.Activity.performCreate(Activity.java:7333)
W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1219)
W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3271)
W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3429)
W/System.err:     at android.app.ActivityThread.-wrap12(Unknown Source:0)
W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2009)
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:109)
W/System.err:     at android.os.Looper.loop(Looper.java:166)
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:7555)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
W/System.err: Caused by: java.lang.NoClassDefFoundError: com.supermap.mapping.MapControl2
W/System.err:     at com.supermap.mapping.MapControl.a(MapControl.java:76)
W/System.err:     at com.supermap.mapping.MapControl.<init>(MapControl.java:47)
W/System.err:     at com.supermap.mapping.MapView.a(MapView.java:91)
W/System.err:     at com.supermap.mapping.MapView.<init>(MapView.java:82)
W/System.err:     ... 26 more
W/System.err: Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cn.sintoon.cloudhm14203-dRiRbkeRToMNPltAUbeJrA==/base.apk"],nativeLibraryDirectories=[/data/app/cn.xxx-dRiRbkeRToMNPltAUbeJrA==/lib/arm, /data/app/cn.xxx-dRiRbkeRToMNPltAUbeJrA==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /product/lib]]] couldn't find "libimb.so"
W/System.err:     at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
W/System.err:     at java.lang.System.loadLibrary(System.java:1660)
W/System.err:     at com.supermap.data.Environment.LoadWrapJ(Environment.java:456)
W/System.err:     at com.supermap.data.Environment.InternalLoadWrapJ(Environment.java:1096)
W/System.err:     at com.supermap.mapping.g.a(InternalEnvironment.java:22)
W/System.err:     at com.supermap.mapping.MapControl2.<clinit>(MapControl2.java:55)
W/System.err:     at com.supermap.mapping.MapControl.a(MapControl.java:76)
W/System.err:     at com.supermap.mapping.MapControl.<init>(MapControl.java:47)
W/System.err:     at com.supermap.mapping.MapView.a(MapView.java:91)
W/System.err:     at com.supermap.mapping.MapView.<init>(MapView.java:82)
W/System.err:     at java.lang.reflect.Constructor.newInstance0(Native Method)
W/System.err:     at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
W/System.err:     at android.view.LayoutInflater.createView(LayoutInflater.java:658)
W/System.err:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:801)
W/System.err:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
W/System.err:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:874)
W/System.err:     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:835)
W/System.err:     at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
W/System.err:     at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
W/System.err:     at android.view.ViewStub.inflateViewNoAdd(ViewStub.java:269)
W/System.err:     at android.view.ViewStub.inflate(ViewStub.java:302)
W/System.err:     at cn.xxx.BaseActivity.initContentView(BaseActivity.java:244)
W/System.err:     ... 14 more

最新提问 1月 11 分类:  420次浏览 | 用户: mxc 初出茅庐 (73 分)

2 个回答

0 投票
 
已采纳

补充一个log

I/zygote: Rejecting re-init on previously-failed class java.lang.Class<com.supermap.mapping.MapControl2>: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cn.xxx-dRiRbkeRToMNPltAUbeJrA==/base.apk"],nativeLibraryDirectories=[/data/app/cn.xxx-dRiRbkeRToMNPltAUbeJrA==/lib/arm, /data/app/cn.xxx-dRiRbkeRToMNPltAUbeJrA==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /product/lib]]] couldn't find "libimb.so"
I/zygote:     at void java.lang.Runtime.loadLibrary0(java.lang.ClassLoader, java.lang.String) (Runtime.java:1011)
I/zygote:     at void java.lang.System.loadLibrary(java.lang.String) (System.java:1660)
I/zygote:     at void com.supermap.data.Environment.LoadWrapJ() (Environment.java:456)
I/zygote:     at void com.supermap.data.Environment.InternalLoadWrapJ() (Environment.java:1096)
I/zygote:     at void com.supermap.mapping.g.a() (InternalEnvironment.java:22)
I/zygote:     at void com.supermap.mapping.MapControl2.<clinit>() (MapControl2.java:55)
I/zygote:     at void com.supermap.mapping.MapControl.a(android.content.Context) (MapControl.java:76)
I/zygote:     at void com.supermap.mapping.MapControl.<init>(android.content.Context) (MapControl.java:47)
I/zygote:     at void com.supermap.mapping.MapView.a(android.content.Context) (MapView.java:91)
I/zygote:     at void com.supermap.mapping.MapView.<init>(android.content.Context, android.util.AttributeSet) (MapView.java:82)
I/zygote:     at java.lang.Object java.lang.reflect.Constructor.newInstance0(java.lang.Object[]) (Constructor.java:-2)
I/zygote:     at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:334)
I/zygote:     at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:658)
I/zygote:     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:801)
I/zygote:     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:741)
I/zygote:     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:874)
I/zygote:     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:835)
I/zygote:     at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:515)
I/zygote:     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:423)
I/zygote:     at android.view.View android.view.ViewStub.inflateViewNoAdd(android.view.ViewGroup) (ViewStub.java:269)
I/zygote:     at android.view.View android.view.ViewStub.inflate() (ViewStub.java:302)
I/zygote:     at boolean cn.sintoon.cloudhm.businessbase.activities.BaseActivity.initContentView() (BaseActivity.java:244)
I/zygote:     at void cn.xxx.activities.BaseActivity.onCreate(android.os.Bundle) (BaseActivity.java:103)
I/zygote:     at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7343)
I/zygote:     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7333)
I/zygote:     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219)
I/zygote:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3271)
I/zygote:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3429)
I/zygote:     at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
I/zygote:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:2009)
I/zygote:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109)
I/zygote:     at void android.os.Looper.loop() (Looper.java:166)
I/zygote:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7555)
I/zygote:     at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/zygote:     at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469)
I/zygote:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963)

最新回答 1月 11 用户: mxc 初出茅庐 (73 分)
采纳于 1月 15 用户:mxc
0 投票
你好,你将So库文件全部添加进去看会不会报错。先排除是不是so库文件缺失导致的
最新回答 1月 11 用户: 董懿鑫 名扬四海 (1,602 分)

不是出错了才去初始化,我在 splash的时候,程序刚打开就初始化成功了。但是会因为别的崩溃会导致程序重启,重启的时候就会出现即使初始化成功也不行。

这个地方之所以进行捕获,就是因为 崩溃后自动重启的时候初始化失败会出现异常,我就捕获一下,一旦出错再次初始化,但是,不好使,即使再次初始化也不行。

正常情况下,是不会出现问题的,问题是在 崩溃后出现的。

layout.activity_b_base 没有任何 和超图有关的控件,只是一个 容器 代码如下:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <android.support.v7.widget.Toolbar
        android:id="@+id/base_toolbar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/toolbar_height"
        android:background="@color/toolbar_bg"
        android:contentInsetEnd="0dp">

     

            <TextView
                android:id="@+id/base_toolbar_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="标题"
                android:textColor="@android:color/white"
                android:textSize="@dimen/sp_16" />


    </android.support.v7.widget.Toolbar>



    <ViewStub
        android:id="@+id/view_stub"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/base_toolbar">

    </ViewStub>



    <LinearLayout
        android:id="@+id/base_progress_wrap"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorBlackLight"
        android:gravity="center"
        android:clickable="true"
        android:visibility="gone"
        android:layout_marginTop="@dimen/dp_50"
        android:orientation="horizontal">
        
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:minHeight="@dimen/dp_50"
            android:layout_gravity="center"
            android:gravity="center"
            android:background="@color/colorBlackLight"
            android:orientation="horizontal">
            <ProgressBar
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/dp_5"/>

            <TextView
                android:id="@+id/base_progress_txt"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="加载中。。。"
                android:textColor="@android:color/white"
                android:textSize="@dimen/sp_18" />

        </LinearLayout>


    </LinearLayout>


</RelativeLayout>

开始的初始化写在哪儿了?为什么重启的时候没有执行?

写在了 splash页的 oncreate内;

重启的时候是因为崩溃导致的默认重启,不会是和打开一样的步骤,就是从崩溃那个activity重新加载出来的,故没有经过 Splash 这个Activity。

public abstract class BSplashActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        String[] permissions = new String[]{Manifest.permission.READ_PHONE_STATE,
                Manifest.permission.WRITE_EXTERNAL_STORAGE,
                Manifest.permission.READ_EXTERNAL_STORAGE};
        boolean b = EasyPermissions.hasPermissions(this, permissions);
        if (b) {
            init();
        }else{
            EasyPermissions.requestPermissions(this,"我们需要一些权限",200,permissions);
        }

    }
    private void init() {
        //检测 map license
        BMapUtil.initMapLicense();

       ......
    }
}

你应该先解决你的崩溃。也可以在崩溃的Activity.onCreate()开始处调用一次初始化。
是的,我应该先解决我的崩溃。
...