title: Error inflating class android.support.design.widget.FloatingActionButton in Android
body: <p>When I'm trying to build the application it will show the <code>android.view.InflateException</code> in FloatingActionButton? I really don't know what causes the error.</p>
  
  <p><strong>Login.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &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"
      android:fitsSystemWindows="true"
      android:background="@drawable/bg_image" &gt;
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;LinearLayout
          android:id="@+id/lLayout_logincontainer"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"
          android:layout_margin="40dp"
          android:orientation="vertical"&gt;
          &lt;ImageView
              android:layout_width="130dp"
              android:layout_height="125dp"
              android:src="@drawable/project"/&gt;
  
          &lt;android.support.design.widget.TextInputLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"&gt;
  
  
              &lt;EditText
                  android:id="@+id/aTxt_UserName"
                  style="@style/edittextstyle"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:hint="User Name"
                  android:imeOptions="actionNext"
                  android:textColorHint="@color/white"
                  &gt;
  
              &lt;/EditText&gt;
  
  
          &lt;/android.support.design.widget.TextInputLayout&gt;
  
          &lt;!--  Password Label --&gt;
          &lt;android.support.design.widget.TextInputLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginBottom="8dp"
              android:layout_marginTop="8dp"&gt;
  
              &lt;EditText
                  android:id="@+id/eTxt_PassWord"
                  style="@style/edittextstyle"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:hint="Password"
                  android:inputType="textPassword"
                  android:textColorHint="@color/white"
                  android:textColor="@color/white" /&gt;
  
          &lt;/android.support.design.widget.TextInputLayout&gt;
  
          &lt;android.support.v7.widget.AppCompatButton
              android:id="@+id/btn_login"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="left"
              android:layout_marginTop="3dp"
              android:background="@drawable/button_shape"
              android:padding="12dp"
              android:text="Login"
              android:textAllCaps="false"
              android:textColor="#ffffff" /&gt;
      &lt;/LinearLayout&gt;
  
  
  &lt;/RelativeLayout&gt;
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/fab"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginBottom="20dp"
          android:layout_gravity="bottom|end"
          android:layout_marginRight="@dimen/fab_margin"
          android:visibility="visible"
          app:backgroundTint="@color/colorTrade_2"
          app:elevation="6dp"
          app:pressedTranslationZ="12dp"
          app:fabSize="normal"
          app:rippleColor="@android:color/transparent"
          android:src="@drawable/ic_user_add" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>styles.xml</p>
  
  <pre><code>&lt;resources&gt;
      &lt;style name="AppBaseTheme" parent="MyMaterialTheme.Base"&gt;
         &lt;/style&gt;
      &lt;style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar"&gt;
          &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
          &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
          &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
          &lt;item name="android:textColor"&gt;@color/colorPrimaryDark&lt;/item&gt;
          &lt;item name="android:itemBackground"&gt;@color/white&lt;/item&gt;
      &lt;/style&gt;
      &lt;style name="AppTheme.NoActionBar"&gt;
          &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
          &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
      &lt;/style&gt;
      &lt;style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /&gt;
      &lt;style name="AppTabTextAppearance" parent="TextAppearance.Design.Tab"&gt;
          &lt;item name="android:textSize"&gt;12sp&lt;/item&gt;
          &lt;item name="textAllCaps"&gt;false&lt;/item&gt;
      &lt;/style&gt;
      &lt;style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /&gt;
      &lt;style name="edittextstyle"&gt;
          &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt;
          &lt;item name="android:textSize"&gt;14sp&lt;/item&gt;
          &lt;item name="android:padding"&gt;10dp&lt;/item&gt;
          &lt;item name="android:singleLine"&gt;true&lt;/item&gt;
          &lt;item name="android:textColorHint"&gt;@color/white&lt;/item&gt;
          &lt;item name="android:inputType"&gt;textFilter&lt;/item&gt;
      &lt;/style&gt;
      &lt;style name="userProfileText"&gt;
          &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt;
          &lt;item name="android:textSize"&gt;14sp&lt;/item&gt;
          &lt;item name="android:padding"&gt;5dp&lt;/item&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>AndroidManifest.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest
  xmlns:android="http://schemas.android.com/apk/res/android" package="com.trade.seems"&gt;
  &lt;uses-library android:name="com.google.android.maps" android:required="true" /&gt;
  &lt;application android:allowBackup="true"
      android:name=".utils.MyApplication"
               android:isolatedProcess="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:largeHeap="true"
      android:theme="@style/AppTheme"&gt;
      &lt;meta-data android:name="com.google.android.gms.version"
          android:value="@integer/google_play_services_version" /&gt;
      &lt;meta-data android:name="com.google.android.geo.API_KEY"
          android:value="@string/google_api_key" /&gt;
      &lt;activity android:name=".uil.SplashActivity"
          android:screenOrientation="sensorPortrait"&gt;
           &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity android:name=".ual.login.LoginActivity"
          android:screenOrientation="sensorPortrait"/&gt;
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  android {
      compileSdkVersion 23
      buildToolsVersion '23.0.3'
      useLibrary 'org.apache.http.legacy'
      defaultConfig {
          applicationId "com.trade.seems"
          minSdkVersion 16
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
          multiDexEnabled true
  
      }
      packagingOptions {
          exclude 'META-INF/DEPENDENCIES.txt'
          exclude 'META-INF/LICENSE.txt'
          exclude 'META-INF/NOTICE.txt'
          exclude 'META-INF/NOTICE'
          exclude 'META-INF/LICENSE'
          exclude 'META-INF/DEPENDENCIES'
          exclude 'META-INF/notice.txt'
          exclude 'META-INF/license.txt'
          exclude 'META-INF/dependencies.txt'
          exclude 'META-INF/maven/ch.acra/acra/pom.xml'
          exclude 'META-INF/maven/ch.acra/acra/pom.properties'
  
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          debug {
          }
      }
      dexOptions {
          javaMaxHeapSize "2g"
      }
  }
  
  dependencies {
      testCompile 'junit:junit:4.12'
      compile files('libs/picasso-2.5.2.jar')
      compile files('libs/httpclient-4.3.6.jar')
      compile files('libs/httpcore-4.3.3.jar')
      compile files('libs/httpmime-4.3.6.jar')
      compile files('libs/YouTubeAndroidPlayerApi.jar')
      compile fileTree(include: ['*.jar'], dir: 'libs')
      /*Support Libraries */
      compile project(':autocomplete_library')
      compile project(':ViewPagerIndicator-Library')
      /*Third party Libraries */
      compile 'es.guiguegon:gallerymodule:1.3.1'
      compile 'de.hdodenhof:circleimageview:2.0.0'
      compile 'com.nineoldandroids:library:2.4.+'
      compile 'com.makeramen:roundedimageview:2.0.1'
      //Library to handle Material design for all Version of android
      compile 'com.rengwuxian.materialedittext:library:2.1.4'
      //Library Glide is to handle Images Instead of picasso
      compile 'com.github.bumptech.glide:glide:3.5.2'
      compile 'com.mcxiaoke.volley:library-aar:1.0.0'
  
  
      /*Google  Android Support Library*/
      compile 'com.google.android.gms:play-services-maps:9.4.0'
      compile 'com.google.android.gms:play-services-location:9.4.0'
      compile 'com.android.support:multidex:1.0.0'
      compile 'com.android.support:appcompat-v7:23.1.1'
      compile 'com.android.support:design:23.1.1'
      compile 'com.android.support:cardview-v7:23.1.1'
      compile 'com.android.support:recyclerview-v7:23.1.1'
      compile 'com.android.support:support-v4:23.1.1' 
  }
  </code></pre>
  
  <p><strong>Complete Error Trace</strong></p>
  
  <pre><code>com.trade.seems E/AndroidRuntime: FATAL EXCEPTION: main Process: com.trade.seemys, PID: 8225 java.lang.RuntimeException: Unable to start activityComponentInfo{com.tradezap.seemysteps/com.trade.seems.ual.login.LoginActivity}: android.view.InflateException: Binary XML file line #84: Binary XML file line #84: Error inflating class android.support.design.widget.FloatingActionButton
                                                                                 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
                                                                                 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
                                                                                 at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
                                                                                 at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                 at android.os.Looper.loop(Looper.java:148)
                                                                                 at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                                 at java.lang.reflect.Method.invoke(Native Method)
                                                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                                              Caused by: android.view.InflateException: Binary XML file line #84: Binary XML file line #84: Error inflating class android.support.design.widget.FloatingActionButton
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
                                                                                 at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
                                                                                 at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
                                                                                 at com.trade.seems.ual.login.LoginActivity.onCreate(LoginActivity.java:55)
                                                                                 at android.app.Activity.performCreate(Activity.java:6251)
                                                                                 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
                                                                                 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
                                                                                 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
                                                                                 at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
                                                                                 at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                 at android.os.Looper.loop(Looper.java:148) 
                                                                                 at android.app.ActivityThread.main(ActivityThread.java:5417) 
                                                                                 at java.lang.reflect.Method.invoke(Native Method) 
                                                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
                                                                              Caused by: android.view.InflateException: Binary XML file line #84: Error inflating class android.support.design.widget.FloatingActionButton
                                                                                 at android.view.LayoutInflater.createView(LayoutInflater.java:645)
                                                                                 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
                                                                                 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
                                                                                 at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
                                                                                 at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
                                                                                 at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) 
                                                                                 at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
                                                                                 at com.trade.seems.ual.login.LoginActivity.onCreate(LoginActivity.java:55) 
                                                                                 at android.app.Activity.performCreate(Activity.java:6251) 
                                                                                 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
                                                                                 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
                                                                                 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
                                                                                 at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
                                                                                 at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                 at android.os.Looper.loop(Looper.java:148) 
                                                                                 at android.app.ActivityThread.main(ActivityThread.java:5417) 
                                                                                 at java.lang.reflect.Method.invoke(Native Method) 
                                                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
                                                                              Caused by: java.lang.reflect.InvocationTargetException
                                                                                 at java.lang.reflect.Constructor.newInstance(Native Method)
                                                                                 at android.view.LayoutInflater.createView(LayoutInflater.java:619)
                                                                                 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764) 
                                                                                 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
                                                                                 at android.view.LayoutInflater.rInflate(LayoutInflater.java:835) 
                                                                                 at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
                                                                                 at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) 
                                                                                 at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
                                                                                 at com.trade.seems.ual.login.LoginActivity.onCreate(LoginActivity.java:55) 
                                                                                 at android.app.Activity.performCreate(Activity.java:6251) 
                                                                                 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
                                                                                 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
                                                                                 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
                                                                                 at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
                                                                                 at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                 at android.os.Looper.loop(Looper.java:148) 
                                                                                 at android.app.ActivityThread.main(ActivityThread.java:5417) 
                                                                                 at java.lang.reflect.Method.invoke(Native Method) 
                                                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
                                                                              Caused by: java.lang.NoSuchMethodError: No direct method &lt;init&gt;(Landroid/widget/ImageView;Landroid/support/v7/widget/AppCompatDrawableManager;)V in class Landroid/support/v7/widget/AppCompatImageHelper; or its super classes (declaration of 'android.support.v7.widget.AppCompatImageHelper' appears in /data/app/com.tradezap.seemysteps-1/base.apk)
                                                                                 at android.support.design.widget.FloatingActionButton.&lt;init&gt;(FloatingActionButton.java:133)
                                                                                 at android.support.design.widget.FloatingActionButton.&lt;init&gt;(FloatingActionButton.java:110)
                                                                                 at java.lang.reflect.Constructor.newInstance(Native Method) 
                                                                                 at android.view.LayoutInflater.createView(LayoutInflater.java:619) 
                                                                                 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764) 
                                                                                 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
                                                                                 at android.view.LayoutInflater.rInflate(LayoutInflater.java:835) 
                                                                                 at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
                                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
                                                                                 at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) 
                                                                                 at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
                                                                                 at com.trade.seems.ual.login.LoginActivity.onCreate(LoginActivity.java:55) 
                                                                                 at android.app.Activity.performCreate(Activity.java:6251) 
                                                                                 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
                                                                                 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
                                                                                 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
                                                                                 at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
                                                                                 at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                 at android.os.Looper.loop(Looper.java:148) 
                                                                                 at android.app.ActivityThread.main(ActivityThread.java:5417) 
                                                                                 at java.lang.reflect.Method.invoke(Native Method) 
                                                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
  </code></pre>