Qihoo360 / RePlugin

RePlugin - A flexible, stable, easy-to-use Android Plug-in Framework
Apache License 2.0
7.27k stars 1.53k forks source link

android.view.InflateException: Binary XML file line #0: Error inflating mobilesafe class android.support.design.widget.TabLayout #483

Open zqh110110 opened 6 years ago

zqh110110 commented 6 years ago

问题详细描述 Detailed description of the problem

Process: com.gw.socketplugin1, PID: 27729 android.view.InflateException: Binary XML file line #0: Error inflating mobilesafe class android.support.design.widget.TabLayout at com.qihoo360.loader2.PluginContext.handleCreateView(PluginContext.java:419) at com.qihoo360.loader2.PluginContext.access$000(PluginContext.java:57) at com.qihoo360.loader2.PluginContext$1.onCreateView(PluginContext.java:83) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772) at android.view.LayoutInflater.rInflate(LayoutInflater.java:851) at android.view.LayoutInflater.rInflate(LayoutInflater.java:854) at android.view.LayoutInflater.inflate(LayoutInflater.java:510) at android.view.LayoutInflater.inflate(LayoutInflater.java:420) at android.databinding.DataBindingUtil.inflate(DataBindingUtil.java:116) at android.databinding.DataBindingUtil.inflate(DataBindingUtil.java:88) at com.gw.plugin.trade.view.fragment.HoldMainFragment.initView(HoldMainFragment.java:20) at com.gw.plugin.trade.view.fragment.BaseFragment.onCreateView(BaseFragment.java:69) at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617) at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:570) at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:164) at android.support.v4.view.ViewPager.populate(ViewPager.java:1177) at android.support.v4.view.ViewPager.populate(ViewPager.java:1025) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1545) at android.view.View.measure(View.java:17605) at android.widget.LinearLayout.measureVertical(LinearLayout.java:875) at android.widget.LinearLayout.onMeasure(LinearLayout.java:613) at android.view.View.measure(View.java:17605) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5693) at android.widget.FrameLayout.onMeasure(FrameLayout.java:436) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135) at android.view.View.measure(View.java:17605) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5693) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436) at android.widget.LinearLayout.measureVertical(LinearLayout.java:722) at android.widget.LinearLayout.onMeasure(LinearLayout.java:613) at android.view.View.measure(View.java:17605) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5693) at android.widget.FrameLayout.onMeasure(FrameLayout.java:436) at android.view.View.measure(View.java:17605) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5693) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436) at android.widget.LinearLayout.measureVertical(LinearLayout.java:722) at android.widget.LinearLayout.onMeasure(LinearLayout.java:613) at android.view.View.measure(View.java:17605) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5693) at android.widget.FrameLayout.onMeasure(FrameLayout.java:436) at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2777) at android.view.View.measure(View.java:17605) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2077) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1204) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1411) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1092) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6047) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803) at android.view.Choreographer.doCallbacks(Choreographer.java:616) at android.view.Choreographer.doF

复现问题步骤 Steps to reproduce the problem

其它重要信息 Other important information

replugin-host-lib/gradle Version: rePlugin-plugin-lib/gradle Version:

Android API Version: Android 手机型号&ROM(Phone model & ROM):

Logcat上下文 Logcat context

SkyEric commented 6 years ago

TabLayout组件在Activity和Fragment内部使用都没有问题的。 建议上传更加详细的崩溃日志信息

scean commented 5 years ago

+1

scean commented 5 years ago

2019-11-01 09:43:56.100 5374-5374/com.tianshen.gamecenter.demo E/程序出现异常了: Thread = main Throwable = Unable to start activity ComponentInfo{com.tianshen.gamecenter.demo/com.tianshen.gamecenter.demo.loader.a.ActivityN1NRNTS1}: android.view.InflateException: Binary XML file line #60: Binary XML file line #59: Error inflating mobilesafe class com.bytedance.sdk.openadsdk.core.widget.TTRatingBar 2019-11-01 09:43:56.103 5374-5374/com.tianshen.gamecenter.demo E/stackTraceInfo: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tianshen.gamecenter.demo/com.tianshen.gamecenter.demo.loader.a.ActivityN1NRNTS1}: android.view.InflateException: Binary XML file line #60: Binary XML file line #59: Error inflating mobilesafe class com.bytedance.sdk.openadsdk.core.widget.TTRatingBar at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) Caused by: android.view.InflateException: Binary XML file line #60: Binary XML file line #59: Error inflating mobilesafe class com.bytedance.sdk.openadsdk.core.widget.TTRatingBar Caused by: android.view.InflateException: Binary XML file line #59: Error inflating mobilesafe class com.bytedance.sdk.openadsdk.core.widget.TTRatingBar at com.qihoo360.loader2.PluginContext.handleCreateView(PluginContext.java:423) at com.qihoo360.loader2.PluginContext.access$000(PluginContext.java:57) at com.qihoo360.loader2.PluginContext$1.onCreateView(PluginContext.java:83) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:774) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.parseInclude(LayoutInflater.java:963) at android.view.LayoutInflater.rInflate(LayoutInflater.java:859) at android.view.LayoutInflater.inflate(LayoutInflater.java:489) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:461) at android.app.Activity.setContentView(Activity.java:2737) at com.cocos.vs.ad.partner.TestFullActivity.onCreate(TestFullActivity.java:10) at android.app.Activity.performCreate(Activity.java:7183) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:334) at com.qihoo360.loader2.PluginContext.handleCreateView(PluginContext.java:416) at com.qihoo360.loader2.PluginContext.access$000(PluginContext.java:57)  at com.qihoo360.loader2.PluginContext$1.onCreateView(PluginContext.java:83)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:774)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)  at android.view.LayoutInflater.parseInclude(LayoutInflater.java:963)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:859)  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)  at android.view.LayoutInflater.inflate(LayoutInflater.java:423)  at android.view.LayoutInflater.inflate(LayoutInflater.java:374)  at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:461)  at android.app.Activity.setContentView(Activity.java:2737)  at com.cocos.vs.ad.partner.TestFullActivity.onCreate(TestFullActivity.java:10)  at android.app.Activity.performCreate(Activity.java:7183)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)  at android.app.ActivityThread.-wrap11(Unknown Source:0)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)  at android.os.Handler.dispatchMessage(Handler.java:105)  at android.os.Looper.loop(Looper.java:164)  at android.app.ActivityThread.main(ActivityThread.java:6944)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)  Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0 at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:225) at android.content.res.Resources.getDrawableForDensity(Resources.java:890) at android.content.res.Resources.getDrawab

scean commented 5 years ago

@zqh110110 @SkyEric @goodev 集成今日头条出现出出现上面描述的问题

tangnuo commented 2 years ago

+1