title: Android runtime exception. Unable to start activity
body: <p>I am working on a very simple wallpaper setter. The app works fine on emulator, but does not work on device. I've tried the app on other devices too, and the result is same.</p>
  
  <p>MainActivity.java:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity  {
      ImageView iv;
      FloatingActionButton fab,fab2;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
          toolbar.setTitleTextColor(getResources().getColor(R.color.white));
          setSupportActionBar(toolbar);
          fab = (FloatingActionButton) findViewById(R.id.fab);
          fab.setImageResource(R.drawable.plus_24x24);
          fab.setBackgroundColor(getResources().getColor(R.color.colorAccent));
          fab.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Intent intent = new Intent();
                  intent.setType("image/*");
                  intent.setAction(Intent.ACTION_GET_CONTENT);
                  startActivityForResult(Intent.createChooser(intent, "Select     Picture"), 9999);
  
              }
          });
          fab2=(FloatingActionButton)findViewById(R.id.fab2);
          fab2.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
          fab2.setImageResource(R.drawable.ic_done_white);
          fab2.setVisibility(View.INVISIBLE);
          fab2.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  WallpaperManager myWallpaperManager
                      = WallpaperManager.getInstance(getApplicationContext());
                  try {
                      myWallpaperManager.setBitmap(((BitmapDrawable)iv.getDrawable()).getBitmap());
                      Snackbar.make(findViewById(android.R.id.content), "Wallpaper set", Snackbar.LENGTH_SHORT).show();
                  } catch (IOException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  }
              }
          });
          iv=(ImageView)findViewById(R.id.imageView);
      }
  
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  
          if (requestCode == 9999 &amp;&amp; resultCode == RESULT_OK &amp;&amp; data != null) {
              fab2.setVisibility(View.VISIBLE);
              Uri imageUri = data.getData();
              iv.setImageURI(imageUri);
  
         }
          else {
              Snackbar.make(findViewById(android.R.id.content), "No image selected", Snackbar.LENGTH_SHORT).show();
         }
     }
  }
  </code></pre>
  
  <p>activity_main.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:ads="http://schemas.android.com/apk/res-auto"
  android:layout_height="match_parent"
  android:layout_width="match_parent"
  xmlns:android.support.design="http://schemas.android.com/tools"
  android:orientation="horizontal"
  xmlns:app="http://schemas.android.com/apk/res-auto"&gt;
  
  
  &lt;android.support.v7.widget.CardView
      android:id="@+id/card_view"
      android:layout_gravity="center"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_below="@+id/toolbar"
      android:layout_marginTop="@dimen/ef_margin_medium"
      android:layout_marginLeft="@dimen/ef_margin_medium"
      android:layout_marginRight="@dimen/ef_margin_medium"
      android:layout_marginBottom="@dimen/ef_margin_medium"
      ads:cardCornerRadius="6dp"
      ads:cardElevation="6dp"
      &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_marginEnd="@dimen/ef_margin_medium"
          android:layout_marginRight="@dimen/ef_margin_medium"
          android:layout_marginBottom="@dimen/ef_margin_medium"
          /&gt;
  
      &lt;ImageView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/imageView"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:layout_alignParentBottom="true" /&gt;
  
  
  &lt;/android.support.v7.widget.CardView&gt;
  
  &lt;android.support.v7.widget.Toolbar
      android:id="@+id/toolbar"
      android:layout_width="match_parent"
      android:layout_height="?attr/actionBarSize"
      android:background="?attr/colorPrimary"
      android:layout_alignParentTop="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true" /&gt;
  
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/fab2"
      android:layout_width="wrap_content"
      android:layout_height="51dp"
      app:fabSize="mini"
      android:backgroundTint="@color/colorAccent"
      android:layout_marginTop="34dp"
      android:layout_marginRight="11dp"
      android:layout_marginEnd="11dp"
      android:layout_alignParentTop="true"
      android:layout_alignRight="@+id/card_view"
      android:layout_alignEnd="@+id/card_view" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Error log:</p>
  
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
                Process: com.entripleaardee.incognitogallery, PID: 4571
                java.lang.RuntimeException: Unable to start activity ComponentInfo{com.entripleaardee.incognitogallery/com.entripleaardee.incognitogallery.MainActivity}: android.view.InflateException: Binary XML file line #55: Binary XML file line #55: Error inflating class &lt;unknown&gt;
  </code></pre>