首页 / 浏览问题 / 移动GIS / 问题详情
行业导航初始化m_Navigation2失败
1EXP 2020年08月31日

使用产品:imoblie 10i  

版本:android10
问题详细描述   运行imoblie10i 示例程序的行业导航时初始化m_Navigation2失败,闪退 Error inflating class ImageView

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.daohangapp, PID: 15589
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.daohangapp/com.example.daohangapp.MainActivity}: android.view.InflateException: Binary XML file line #20 in com.example.daohangapp:color/abc_background_cache_hint_selector_material_dark: Binary XML file line #20 in com.example.daohangapp:color/abc_background_cache_hint_selector_material_dark: Error inflating class ImageView
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3895)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4074)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2473)
        at android.os.Handler.dispatchMessage(Handler.java:110)
        at android.os.Looper.loop(Looper.java:219)
        at android.app.ActivityThread.main(ActivityThread.java:8347)
        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:1055)
     Caused by: android.view.InflateException: Binary XML file line #20 in com.example.daohangapp:color/abc_background_cache_hint_selector_material_dark: Binary XML file line #20 in com.example.daohangapp:color/abc_background_cache_hint_selector_material_dark: Error inflating class ImageView
     Caused by: android.view.InflateException: Binary XML file line #20 in com.example.daohangapp:color/abc_background_cache_hint_selector_material_dark: Error inflating class ImageView
     Caused by: android.content.res.Resources$NotFoundException: Drawable (missing name) with resource ID #0x7f03004e
     Caused by: android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f03004e
        at android.content.res.ResourcesImpl.getResourcePackageName(ResourcesImpl.java:387)
        at android.content.res.ResourcesImplEx.getResourcePackageName(ResourcesImplEx.java:50)
        at android.content.res.HwResourcesImpl.getThemePackageName(HwResourcesImpl.java:1742)
        at android.content.res.HwResourcesImpl.loadDrawable(HwResourcesImpl.java:1340)
        at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:885)
        at android.content.res.Resources.loadDrawable(Resources.java:1004)
        at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:1207)
        at android.content.res.TypedArray.getDrawable(TypedArray.java:1182)
        at android.view.View.<init>(View.java:5326)
        at android.widget.ImageView.<init>(ImageView.java:199)
        at android.widget.ImageView.<init>(ImageView.java:194)
        at androidx.appcompat.widget.AppCompatImageView.<init>(AppCompatImageView.java:74)
        at androidx.appcompat.widget.AppCompatImageView.<init>(AppCompatImageView.java:69)
        at androidx.appcompat.app.AppCompatViewInflater.createImageView(AppCompatViewInflater.java:199)
        at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:119)
        at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1551)
        at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1602)
        at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1071)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1007)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:971)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1133)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1094)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1136)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1094)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1136)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1094)
E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:692)

1个回答

您好,请问一下您的activity继承的是哪种activity呢,使用行业导航需要继承Activity。如:

9,192EXP 2020年08月31日
...