RecyclerTabLayout icon indicating copy to clipboard operation
RecyclerTabLayout copied to clipboard

android.view.InflateException: Binary XML file line #19: Binary XML file line #19

Open MP4Four opened this issue 6 years ago • 4 comments

android.view.InflateException: Binary XML file line #19: Binary XML file line #19: Error inflating class com.nshmura.recyclertablayout.RecyclerTabLayout Caused by: android.view.InflateException: Binary XML file line #19: Error inflating class com.nshmura.recyclertablayout.RecyclerTabLayout Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) 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.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at com.hyphenate.chatuidemo.ui.PacketsFragment.onCreateView(PacketsFragment.java:50) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2343) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:794) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367) at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229) at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3221) at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3171) at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:192) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:552) at com.hyphenate.chatuidemo.ui.BaseActivity.onStart(BaseActivity.java:36) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1391) at android.app.Activity.performStart(Activity.java:7157) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2937) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 2: TypedValue{t=0x2/d=0x7f03004d a=4} at android.content.res.TypedArray.getColor(TypedArray.java:477) at com.nshmura.recyclertablayout.RecyclerTabLayout.getAttributes(RecyclerTabLayout.java:101) at com.nshmura.recyclertablayout.RecyclerTabLayout.(RecyclerTabLayout.java:85) at com.nshmura.recyclertablayout.RecyclerTabLayout.(RecyclerTabLayout.java:78)

the line 19 is "<com.nshmura.recyclertablayout.RecyclerTabLayout"

MP4Four avatar Oct 25 '18 11:10 MP4Four

View view = inflater.inflate(R.layout.activity_demo_basic, container, false); protected void onStart() { super.onStart(); } private void getAttributes(Context context, AttributeSet attrs, int defStyle) These three sentences caused the error

MP4Four avatar Oct 25 '18 11:10 MP4Four

OK,I know the answer after I gave up this and when I turn to use TabLayout it still has the same error so I know the answer is that my AnroidManifest.xml is a useless "theme". Now this issue can be closed. Thanks however.

MP4Four avatar Oct 25 '18 12:10 MP4Four

how did you fixed it @MP4Four ?

gauravrai1 avatar Nov 18 '18 12:11 gauravrai1

The reason of mine is that the theme is conflict,check your theme. 原始邮件 发件人:gaurav [email protected] 收件人:nshmura/[email protected] 抄送:[email protected]; [email protected] 发送时间:2018年11月18日(周日) 20:34 主题:Re: [nshmura/RecyclerTabLayout] android.view.InflateException: BinaryXML file line #19: Binary XML file line #19 (#45)

how did you fixed it @MP4Four ? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

MP4Four avatar Nov 23 '18 02:11 MP4Four