question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error inflating class com.roughike.bottombar.BottomBar

See original GitHub issue

I am getting an error that maybe is popular as a issues here, but I can’t to fix it Help please. 01-23 14:21:46.802 16323-16323/app.platzigram E/AndroidRuntime: FATAL EXCEPTION: main Process: app.platzigram, PID: 16323 java.lang.RuntimeException: Unable to start activity ComponentInfo{app.platzigram/app.platzigram.views.ContainerActivity}: android.view.InflateException: Binary XML file line #16: Binary XML file line #7: Error inflating class com.roughike.bottombar.BottomBar at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused by: android.view.InflateException: Binary XML file line #16: Binary XML file line #7: Error inflating class com.roughike.bottombar.BottomBar Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class com.roughike.bottombar.BottomBar Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at android.view.LayoutInflater.createView(LayoutInflater.java:645) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.rInflate(LayoutInflater.java:858) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.parseInclude(LayoutInflater.java:994) at android.view.LayoutInflater.rInflate(LayoutInflater.java:854) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.inflate(LayoutInflater.java:518) at android.view.LayoutInflater.inflate(LayoutInflater.java:426) at android.view.LayoutInflater.inflate(LayoutInflater.java:377) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:288) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143) at app.platzigram.views.ContainerActivity.onCreate(ContainerActivity.java:21) at android.app.Activity.performCreate(Activity.java:6662) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused by: java.lang.ArithmeticException: divide by zero at com.roughike.bottombar.BottomBar.resizeTabsToCorrectSizes(BottomBar.java:322) at com.roughike.bottombar.BottomBar.updateItems(BottomBar.java:310) at com.roughike.bottombar.BottomBar.setItems(BottomBar.java:246) at com.roughike.bottombar.BottomBar.setItems(BottomBar.java:229) at com.roughike.bottombar.BottomBar.init(BottomBar.java:122) at com.roughike.bottombar.BottomBar.<init>(BottomBar.java:111) at java.lang.reflect.Constructor.newInstance0(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:430)  at android.view.LayoutInflater.createView(LayoutInflater.java:645)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)  at android.view.LayoutInflater.parseInclude(LayoutInflater.java:994)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:854)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)  at android.view.LayoutInflater.inflate(LayoutInflater.java:518)  at android.view.LayoutInflater.inflate(LayoutInflater.java:426)  at android.view.LayoutInflater.inflate(LayoutInflater.java:377)  at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:288)  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)  at app.platzigram.views.ContainerActivity.onCreate(ContainerActivity.java:21)  at android.app.Activity.performCreate(Activity.java:6662)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6077)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 

That’s crashing on my BottomBar.xml file

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

    <com.roughike.bottombar.BottomBar
        android:id="@+id/bottombar"
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:layout_alignParentBottom="true"
        android:layout_gravity="bottom"
        app:bb_activeTabColor="@android:color/white"
        app:bb_inActiveTabColor="@android:color/white"
        app:bb_tabXmlResource="@xml/bottombartaps"/>
</RelativeLayout>

I Built and cleaned the project before, but doesn’t working

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
lamba92commented, Feb 23, 2017

Exact same error here… Building on latest android studio on win10, minSDK 18, max 25

0reactions
FR0ST1Ncommented, Aug 6, 2017

@Are0215 can you post the bottombartaps xml file?

Read more comments on GitHub >

github_iconTop Results From Across the Web

bottom-bar inflating exception in 21 API - Stack Overflow
My project gives an exception. I searched on the internet. But I did not find anything. When I pass to activity that in...
Read more >
android.view.InflateException: Binary XML file line #137
android.view.InflateException: Binary XML file line #137: Binary XML file line #137: Error inflating class com.roughike.bottombar.BottomBar.
Read more >
bemoreinnovations / BottomBar Download - JitPack
JitPack makes it easy to release your Java or Android library. Publish straight from GitHub or Bitbucket.
Read more >
Error inflating class. Fixed - YouTube
how to fix Error inflating class androidx.constraintlayout.widget.ConstraintLayout#ErrorInflatingClass #androidx.constraintlayout.widget.
Read more >
android.view.InflateException: Binary XML file line #2: Error ...
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class unknowntag... error inflating class unknown ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found