title: Android error inflating FloatingActionButton
body: <p>I'm developing and android app, everything worked perfect, then i had a simple code, tested and error free, then when i try to test the app, my mainscreen Activity start throwing the following 3 errors:</p>
  
  <pre><code>Caused by: android.view.InflateException: Binary XML file line #53: Error inflating class android.support.design.widget.FloatingActionButton
  
  Caused by: java.lang.reflect.InvocationTargetException
  
  Caused by: java.lang.IllegalAccessError: tried to access class android.support.v7.widget.AppCompatImageHelper from class android.support.design.widget.FloatingActionButton
  </code></pre>
  
  <p>The all three errors at the same time and in the same line(<code>setContentView(R.layout.activity_main_screen);</code>) in ActivityMainScreen.java <code>onCreate()</code>, The thing is that the code i had was in a way different activity, who isn't even related to the main one, so i don't know what could it be, hope you can help, here is the code of the error:</p>
  
  <p><strong>activity_main_screen.xml:</strong></p>
  
  <p>
  </p>
  
  <pre><code>&lt;RelativeLayout
      android:id="@+id/Container"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="#fff"&gt;
  
      &lt;RelativeLayout
          android:id="@+id/content_frame"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="false"
          android:layout_alignParentEnd="true"
          android:background="#fff"
          android:paddingTop="50dp"&gt;&lt;/RelativeLayout&gt;
      &lt;android.support.design.widget.AppBarLayout xmlns:app="http://schemas.android.com/apk/res-auto"
          android:id="@+id/appbarlayout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          app:elevation="2dp"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:minHeight="50dp"
              app:elevation="2dp"
              android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
              android:background="@color/primary_dark_material_dark"
              android:layout_above="@+id/content_frame"
              android:layout_alignParentStart="true"&gt;
  
              &lt;ImageButton
                  android:id="@+id/Sort"
                  android:layout_width="wrap_content"
                  android:layout_height="match_parent"
                  android:src="@drawable/ic_action_filter"
                  android:background="@color/transparent"
                  android:layout_gravity="right"
                  android:layout_marginEnd="10dp"/&gt;
  
          &lt;/android.support.v7.widget.Toolbar&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/fab"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="bottom|end"
          android:layout_alignParentBottom="true"
          android:layout_marginEnd="15dp"
          android:layout_marginBottom="15dp"
          android:src="@drawable/ic_add_white_24dp"
          app:fabSize="normal"
          app:backgroundTint="@color/colorPrimary"
          android:layout_alignParentEnd="true" /&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;ListView
      android:id="@+id/left_drawer"
      android:layout_width="240dp"
      android:layout_height="match_parent"
      android:layout_gravity="start"
      android:choiceMode="singleChoice"
      android:divider="@android:color/transparent"
      android:dividerHeight="0dp"
      android:background="#111"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>MainScreenActivity.java:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          FacebookSdk.sdkInitialize(getApplicationContext());
          setContentView(R.layout.activity_main_screen);
  
          tagTitles = getResources().getStringArray(R.array.navigation_array);
          drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
          drawerList = (ListView) findViewById(R.id.left_drawer);
          toolbar = (Toolbar) findViewById(R.id.toolbar);
          toolbar.bringToFront();
          fab = (FloatingActionButton) findViewById(R.id.fab);
          fab.bringToFront();
  
          Sort = (ImageView) findViewById(R.id.Sort);
  
          fab.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Intent i = new Intent(MainScreenActivity.this,CreateWorkout.class);
                  startActivityForResult(i,1);
              }
          });
  
          ArrayList&lt;DrawerItem&gt; items = new ArrayList&lt;DrawerItem&gt;();
          items.add(new DrawerItem(tagTitles[0],R.mipmap.home));
          items.add(new DrawerItem(tagTitles[1],R.mipmap.acrobatics));
          items.add(new DrawerItem(tagTitles[2],R.mipmap.profile));
  
          drawerList.setAdapter(new DrawerListAdapter(this, items));
          drawerList.setOnItemClickListener(new DrawerItemClickListener());
  
          // Crear ActionBarDrawerToggle para la apertura y cierre
  //        drawerToggle.setDrawerIndicatorEnabled(false);
          toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
          toolbar.setTitle("Home");
          toolbar.setNavigationOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  if (drawerLayout.isDrawerOpen(drawerList)){
                      drawerLayout.closeDrawer(drawerList);
                  }
                  else
                      drawerLayout.openDrawer(drawerList);
              }
          });
  
          if (savedInstanceState == null) {
              selectItem(0);
          }
  
          Sort.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  new MaterialDialog.Builder(MainScreenActivity.this)
                          .title(R.string.filtertitle)
                          .items(R.array.filter_items)
                          .itemsCallbackSingleChoice(-1, new MaterialDialog.ListCallbackSingleChoice() {
                              @Override
                              public boolean onSelection(MaterialDialog dialog, View view, int which, CharSequence text) {
                                  android.support.v4.app.FragmentManager fragmentManager = getSupportFragmentManager();
                                  if (which != -1){
                                      Fragment currentFragment = fragmentManager.findFragmentById(R.id.content_frame);
                                      if (currentFragment instanceof MainFragment) {
                                          ((MainFragment) currentFragment).Task(text.toString());
                                          //place your filtering logic here using currentFragment
                                      }
                                  }
                                  return true;
                              }
                          })
                          .positiveText(R.string.choose)
                          .show();
              }
          });
      }
  </code></pre>