android.view.InflateException: Binary XML file line #2: Error inflating class <unknown> bug解决
博客专区 > SuShine 的博客 > 博客详情
android.view.InflateException: Binary XML file line #2: Error inflating class <unknown> bug解决
SuShine 发表于2年前
android.view.InflateException: Binary XML file line #2: Error inflating class <unknown> bug解决
  • 发表于 2年前
  • 阅读 141
  • 收藏 0
  • 点赞 0
  • 评论 0

腾讯云 技术升级10大核心产品年终让利>>>   

查看后发现, 原来是这个布局中引用的两个在sw-600dp 的有两个图片资源 没有放到hdpi导致

把这两个图片cpoy到hdpi一份就可以运行了



06-19 11:58:50.429  20084-20084/tv.peel.app E/AndroidRuntime﹕ FATAL EXCEPTION: main

    android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
            at android.view.LayoutInflater.createView(LayoutInflater.java:613)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at com.peel.ui.ControlPadFragmentChina.inflatePowerLayout(ControlPadFragmentChina.java:591)
            at com.peel.ui.ControlPadFragmentChina.inflateControlView(ControlPadFragmentChina.java:877)
            at com.peel.ui.ControlPadFragmentChina.populateActivityControls(ControlPadFragmentChina.java:568)
            at com.peel.ui.ControlPadFragmentChina.update(ControlPadFragmentChina.java:349)
            at com.peel.ui.ControlPadFragmentChina.onViewStateRestored(ControlPadFragmentChina.java:263)
            at android.support.v4.app.Fragment.restoreViewState(Fragment.java:451)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:960)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:446)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4966)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.reflect.InvocationTargetException
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
            at android.view.LayoutInflater.createView(LayoutInflater.java:587)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at com.peel.ui.ControlPadFragmentChina.inflatePowerLayout(ControlPadFragmentChina.java:591)
            at com.peel.ui.ControlPadFragmentChina.inflateControlView(ControlPadFragmentChina.java:877)
            at com.peel.ui.ControlPadFragmentChina.populateActivityControls(ControlPadFragmentChina.java:568)
            at com.peel.ui.ControlPadFragmentChina.update(ControlPadFragmentChina.java:349)
            at com.peel.ui.ControlPadFragmentChina.onViewStateRestored(ControlPadFragmentChina.java:263)
            at android.support.v4.app.Fragment.restoreViewState(Fragment.java:451)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:960)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:446)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4966)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: android.content.res.Resources$NotFoundException: File res/drawable/action_power_stateful.xml from drawable resource ID #0x7f020099
            at android.content.res.Resources.loadDrawable(Resources.java:1947)
            at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
            at android.widget.TextView.<init>(TextView.java:618)
            at android.widget.TextView.<init>(TextView.java:442)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
            at android.view.LayoutInflater.createView(LayoutInflater.java:587)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at com.peel.ui.ControlPadFragmentChina.inflatePowerLayout(ControlPadFragmentChina.java:591)
            at com.peel.ui.ControlPadFragmentChina.inflateControlView(ControlPadFragmentChina.java:877)
            at com.peel.ui.ControlPadFragmentChina.populateActivityControls(ControlPadFragmentChina.java:568)
            at com.peel.ui.ControlPadFragmentChina.update(ControlPadFragmentChina.java:349)
            at com.peel.ui.ControlPadFragmentChina.onViewStateRestored(ControlPadFragmentChina.java:263)
            at android.support.v4.app.Fragment.restoreViewState(Fragment.java:451)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:960)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:446)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4966)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f0200cc
            at android.content.res.Resources.getValue(Resources.java:1013)
            at android.content.res.Resources.getDrawable(Resources.java:658)
            at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
            at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:881)
            at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818)
            at android.content.res.Resources.loadDrawable(Resources.java:1944)
            at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
            at android.widget.TextView.<init>(TextView.java:618)
            at android.widget.TextView.<init>(TextView.java:442)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
            at android.view.LayoutInflater.createView(LayoutInflater.java:587)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at com.peel.ui.ControlPadFragmentChina.inflatePowerLayout(ControlPadFragmentChina.java:591)
            at com.peel.ui.ControlPadFragmentChina.inflateControlView(ControlPadFragmentChina.java:877)
            at com.peel.ui.ControlPadFragmentChina.populateActivityControls(ControlPadFragmentChina.java:568)
            at com.peel.ui.ControlPadFragmentChina.update(ControlPadFragmentChina.java:349)
            at com.peel.ui.ControlPadFragmentChina.onViewStateRestored(ControlPadFragmentChina.java:263)
            at android.support.v4.app.Fragment.restoreViewState(Fragment.java:451)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:960)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:446)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4966)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
            at dalvik.system.NativeStart.main(Native Method)
06-19 12:01:43.179  21785-21785/tv.peel.app E/com.peel.main.Home﹕ tmp countryName China
06-19 12:01:43.179  21785-21785/tv.peel.app E/com.peel.main.Home﹕ tmp Config.LEGACY http://epg.peelchina.com/
共有 人打赏支持
粉丝 118
博文 321
码字总数 79631
×
SuShine
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: