title: Unable to start activity ComponentInfo android.view.InflateException: Binary XML file line #49: Error inflating class <unknown>
body: <p>I'm new in android. I tried to build a project from youtube tutorial but in this layout I got some errors and can't solve it. Someone said me problem in my support library But I don't understand what to do.</p>
  
  <p>Here is my library:</p>
  
  <pre><code>compile 'com.android.support:design:26.+'
  compile 'com.cepheuen.elegant-number-button:lib:1.0.2'
  compile 'com.android.support:design:26.+'
  compile 'com.android.support:appcompat-v7:26.+'
  compile 'com.android.support.constraint:constraint-layout:1.0.2'
  compile 'com.google.firebase:firebase-core:10.2.0'
  compile 'com.google.firebase:firebase-database:10.2.0'
  compile 'info.hoang8f:fbutton:1.0.5'
  compile 'com.rengwuxian.materialedittext:library:2.1.4'
  compile 'com.android.support:cardview-v7:26.+'
  compile 'com.android.support:recyclerview-v7:26.+'
  compile 'com.squareup.picasso:picasso:2.5.2'
  compile 'com.firebaseui:firebase-ui-database:1.2.0'
  testCompile 'junit:junit:4.12'
  </code></pre>
  
  <p>Here is the <strong>error log</strong>:</p>
  
  <pre><code>&gt; FATAL EXCEPTION: main  Process: com.example.lol.smartwaiter, PID: 6821
  &gt; java.lang.RuntimeException: Unable to start activity
  &gt; ComponentInfo{com.example.lol.smartwaiter/com.example.lol.smartwaiter.FoodDetails}:
  &gt; android.view.InflateException: Binary XML file line #49: Error
  &gt; inflating class &lt;unknown&gt; at
  &gt; android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
  &gt; at
  &gt; android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
  &gt; at android.app.ActivityThread.access$800(ActivityThread.java:151) at
  &gt; android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
  &gt; at android.os.Handler.dispatchMessage(Handler.java:102) at
  &gt; android.os.Looper.loop(Looper.java:135) at
  &gt; android.app.ActivityThread.main(ActivityThread.java:5254) at
  &gt; java.lang.reflect.Method.invoke(Native Method) at
  &gt; java.lang.reflect.Method.invoke(Method.java:372) at
  &gt; com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
  &gt; at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
  &gt; 
  &gt; 
  &gt; Caused by: android.view.InflateException: Binary XML file line #49:
  &gt; Error inflating class &lt;unknown&gt; at
  &gt; android.view.LayoutInflater.createView(LayoutInflater.java:633) at
  &gt; android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
  &gt; at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at
  &gt; android.view.LayoutInflater.inflate(LayoutInflater.java:504) at
  &gt; android.view.LayoutInflater.inflate(LayoutInflater.java:414) at
  &gt; android.view.LayoutInflater.inflate(LayoutInflater.java:365) at
  &gt; android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:289)
  &gt; at
  &gt; android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
  &gt; at
  &gt; com.example.lol.smartwaiter.FoodDetails.onCreate(FoodDetails.java:35)
  &gt; at android.app.Activity.performCreate(Activity.java:5990) at
  &gt; android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
  &gt; at
  &gt; android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
  &gt; at
  &gt; android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
  &gt; at android.app.ActivityThread.access$800(ActivityThread.java:151)  at
  &gt; android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
  &gt; at android.os.Handler.dispatchMessage(Handler.java:102) at
  &gt; android.os.Looper.loop(Looper.java:135)  at
  &gt; android.app.ActivityThread.main(ActivityThread.java:5254)  at
  &gt; java.lang.reflect.Method.invoke(Native Method)  at
  &gt; java.lang.reflect.Method.invoke(Method.java:372)   at
  &gt; com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
  &gt; at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)   
  &gt; 
  &gt; Caused by: java.lang.reflect.InvocationTargetException at
  &gt; java.lang.reflect.Constructor.newInstance(Native Method) at
  &gt; java.lang.reflect.Constructor.newInstance(Constructor.java:288) at
  &gt; android.view.LayoutInflater.createView(LayoutInflater.java:607) at
  &gt; android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
  &gt; at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)  at
  &gt; android.view.LayoutInflater.inflate(LayoutInflater.java:504)  at
  &gt; android.view.LayoutInflater.inflate(LayoutInflater.java:414)  at
  &gt; android.view.LayoutInflater.inflate(LayoutInflater.java:365)  at
  &gt; android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:289)
  &gt; at
  &gt; android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
  &gt; at
  &gt; com.example.lol.smartwaiter.FoodDetails.onCreate(FoodDetails.java:35) 
  &gt; at android.app.Activity.performCreate(Activity.java:5990)  at
  &gt; android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
  &gt; at
  &gt; android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
  &gt; at
  &gt; android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
  &gt; at android.app.ActivityThread.access$800(ActivityThread.java:151)  at
  &gt; android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
  &gt; at android.os.Handler.dispatchMessage(Handler.java:102)  at
  &gt; android.os.Looper.loop(Looper.java:135)  at
  &gt; android.app.ActivityThread.main(ActivityThread.java:5254)  at
  &gt; java.lang.reflect.Method.invoke(Native Method)  at
  &gt; java.lang.reflect.Method.invoke(Method.java:372)   at
  &gt; com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
  &gt; at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
  &gt; 
  &gt; 
  &gt; Caused by: java.lang.NullPointerException: Attempt to invoke virtual
  &gt; method 'android.graphics.drawable.Drawable
  &gt; android.graphics.drawable.Drawable$ConstantState.newDrawable()' on a
  &gt; null object reference at
  &gt; android.graphics.drawable.LayerDrawable$ChildDrawable.&lt;init&gt;(LayerDrawable.java:961)
  &gt; at
  &gt; android.graphics.drawable.LayerDrawable$LayerState.&lt;init&gt;(LayerDrawable.java:1007)
  &gt; at
  &gt; android.graphics.drawable.RippleDrawable$RippleState.&lt;init&gt;(RippleDrawable.java:922)
  &gt; at
  &gt; android.graphics.drawable.RippleDrawable.createConstantState(RippleDrawable.java:913)
  &gt; at
  &gt; android.graphics.drawable.RippleDrawable.createConstantState(RippleDrawable.java:94)
  &gt; at
  &gt; android.graphics.drawable.LayerDrawable.mutate(LayerDrawable.java:912)
  &gt; at
  &gt; android.graphics.drawable.RippleDrawable.mutate(RippleDrawable.java:899)
  &gt; at android.view.View.applyBackgroundTint(View.java:16425) at
  &gt; android.view.View.setBackgroundDrawable(View.java:16294) at
  &gt; android.support.design.widget.FloatingActionButton.access$001(FloatingActionButton.java:68)
  &gt; at
  &gt; android.support.design.widget.FloatingActionButton$ShadowDelegateImpl.setBackgroundDrawable(FloatingActionButton.java:822)
  &gt; at
  &gt; android.support.design.widget.FloatingActionButtonLollipop.setBackgroundDrawable(FloatingActionButtonLollipop.java:69)
  &gt; at
  &gt; android.support.design.widget.FloatingActionButton.&lt;init&gt;(FloatingActionButton.java:179)
  &gt; at
  &gt; android.support.design.widget.FloatingActionButton.&lt;init&gt;(FloatingActionButton.java:151)
  &gt; at java.lang.reflect.Constructor.newInstance(Native Method)  at
  &gt; java.lang.reflect.Constructor.newInstance(Constructor.java:288)  at
  &gt; android.view.LayoutInflater.createView(LayoutInflater.java:607)  at
  &gt; android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
  &gt; at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)  at
  &gt; android.view.LayoutInflater.inflate(LayoutInflater.java:504)  at
  &gt; android.view.LayoutInflater.inflate(LayoutInflater.java:414)  at
  &gt; android.view.LayoutInflater.inflate(LayoutInflater.java:365)  at
  &gt; android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:289)
  &gt; at
  &gt; android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
  &gt; at
  &gt; com.example.lol.smartwaiter.FoodDetails.onCreate(FoodDetails.java:35) 
  &gt; at android.app.Activity.performCreate(Activity.java:5990)  at
  &gt; android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
  &gt; at
  &gt; android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
  &gt; at
  &gt; android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
  &gt; at android.app.ActivityThread.access$800(ActivityThread.java:151)  at
  &gt; android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
  &gt; at android.os.Handler.dispatchMessage(Handler.java:102)  at
  &gt; android.os.Looper.loop(Looper.java:135)  at
  &gt; android.app.ActivityThread.main(ActivityThread.java:5254)  at
  &gt; java.lang.reflect.Method.invoke(Native Method)  at
  &gt; java.lang.reflect.Method.invoke(Method.java:372)  at
  &gt; com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
  &gt; at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;android.support.design.widget.CoordinatorLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.example.lol.smartwaiter.FoodDetails"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/app_bar_layout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
          android:fitsSystemWindows="true"&gt;
  
          &lt;android.support.design.widget.CollapsingToolbarLayout
              android:id="@+id/collapsing"
              android:layout_width="match_parent"
              android:layout_height="350dp"
              android:fitsSystemWindows="true"
              app:layout_scrollFlags="scroll|exitUntilCollapsed"
              app:contentScrim="#0e0d0e"
              app:expandedTitleTextAppearance="@android:color/transparent"&gt;
  
              &lt;ImageView
                  android:id="@+id/img_food"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:contentDescription="@null"
                  android:scaleType="centerCrop"
                  app:layout_collapseMode="parallax"/&gt;
  
              &lt;android.support.v7.widget.Toolbar
                  android:id="@+id/toolbar"
                  android:title="Food Name"
                  android:layout_width="match_parent"
                  android:layout_height="?attr/actionBarSize"
                  app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
                  app:layout_collapseMode="parallax"/&gt;
  
          &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/btnCart"
          android:src="@drawable/ic_shopping_cart_black_24dp"
          android:backgroundTint="@android:color/white"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          app:elevation="6dp"
          app:pressedTranslationZ="12dp"
          app:layout_anchor="@id/app_bar_layout"
          app:layout_anchorGravity="bottom|right|end"
          app:useCompatPadding="true"/&gt;
  
      &lt;android.support.v4.widget.NestedScrollView
          android:id="@+id/nestedScrollView"
          android:clipToPadding="false"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
          &lt;LinearLayout
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"&gt;
  
              &lt;android.support.v7.widget.CardView
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  app:cardElevation="5dp"
                  app:cardUseCompatPadding="true"&gt;
  
                  &lt;LinearLayout
                      android:orientation="vertical"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"&gt;
  
                      &lt;TextView
                          android:id="@+id/food_name"
                          android:layout_marginTop="8dp"
                          android:padding="12dp"
                          android:text="Food Name"
                          android:textColor="@color/colorPrimary"
                          android:textSize="20sp"
                          android:textStyle="bold"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content" /&gt;
  
                     &lt;LinearLayout
                         android:id="@+id/layout_price"
                         android:orientation="horizontal"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"&gt;
  
                         &lt;ImageView
                              android:src="@drawable/ic_attach_money_black_24dp"
                              android:layout_weight="1"
                              android:layout_width="0dp"
                              android:layout_height="wrap_content" /&gt;
  
                         &lt;TextView
                             android:id="@+id/food_price"
                             android:text="1,000"
                             android:textColor="@color/colorPrimary"
                             android:textSize="18sp"
                             android:textStyle="bold"
                             android:layout_weight="9"
                             android:layout_width="0dp"
                             android:layout_height="wrap_content" /&gt;
                     &lt;/LinearLayout&gt;
  
                    &lt;com.cepheuen.elegantnumberbutton.view.ElegantNumberButton
                          android:id="@+id/number_button"
                          android:layout_width="100dp"
                          android:layout_height="30dp"
                          android:layout_marginTop="8dp"
                          android:layout_marginLeft="8dp"
                          android:layout_marginBottom="8dp"
                          app:textSize="8sp"
                          app:backGroundColor="@color/colorAccent"
                          app:initialNumber="1"
                          app:finalNumber="20"/&gt;
  
                  &lt;/LinearLayout&gt;
  
              &lt;/android.support.v7.widget.CardView&gt;
  
              &lt;android.support.v7.widget.CardView
                  app:cardElevation="5dp"
                  app:cardUseCompatPadding="true"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"&gt;
  
                  &lt;TextView
                      android:id="@+id/food_description"
                      android:layout_marginTop="12dp"
                      android:lineSpacingMultiplier="1.5"
                      android:padding="12dp"
                      android:text="Description"
                      android:textColor="@android:color/black"
                      android:textSize="14sp"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content" /&gt;
              &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/android.support.v4.widget.NestedScrollView&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>