title: Caused by: android.view.InflateException: Binary XML file line #51: Error inflating class Button
body: <p>Hi my app crashes whenever i run it, i checked Logcat
       and it gives this string of error </p>
  
  <p>my code and the structure of my app is below , i have been looking for answer 
   and hope someone help me. </p>
  
  <p>thanks  in advance</p>
  
  <pre><code>       Caused by: android.view.InflateException: Binary XML file line #51: 
               Error inflating class Button.
  
          Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f070063 a=-1 r=0x7f070063}
  </code></pre>
  
  <h1>here is my XML</h1>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;  android.support.constraint.ConstraintLayout 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=".MainActivity"&gt;
  
  
  
  
  
      &lt;!--tools:layout_editor_absoluteX="16dp"--&gt;
      &lt;!--tools:layout_editor_absoluteY="81dp"--&gt;
  
  
      &lt;android.support.constraint.ConstraintLayout
          android:layout_width="135dp"
          android:layout_height="203dp"
          android:layout_marginLeft="4dp"
          android:layout_marginStart="4dp"
          android:layout_marginTop="60dp"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"&gt;
  
          &lt;TextView
              android:id="@+id/textView_login"
              style="@style/Longin"
              android:layout_width="69dp"
              android:layout_height="30dp"
              android:layout_marginLeft="4dp"
              android:layout_marginStart="4dp"
              android:text="@string/app_loging"
              android:translationZ="3dp"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent"
              app:layout_constraintVertical_bias="0.15" /&gt;
      &lt;/android.support.constraint.ConstraintLayout&gt;
  
  
      &lt;android.support.constraint.ConstraintLayout
          android:layout_width="172dp"
          android:layout_height="431dp"
          android:layout_marginTop="64dp"
  
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintTop_toTopOf="parent"&gt;
  
  
          &lt;Button
              android:id="@+id/backedbackground"
              style="@style/first"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_marginLeft="16dp"
              android:layout_marginStart="16dp"
              android:background="@drawable/first"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent" /&gt;
  
  
          &lt;TextView
              android:id="@+id/textView_signup"
              style="@style/Longin"
              android:layout_width="69dp"
              android:layout_height="30dp"
              android:layout_marginEnd="8dp"
              android:layout_marginLeft="8dp"
              android:layout_marginRight="8dp"
              android:layout_marginStart="8dp"
              android:layout_marginTop="24dp"
              android:text="@string/app_singup"
              android:textColor="@color/colorwhite"
              android:translationZ="3dp"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintHorizontal_bias="0.908"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent" /&gt;
  
      &lt;/android.support.constraint.ConstraintLayout&gt;
  
  
      &lt;android.support.constraint.ConstraintLayout
          android:layout_width="312dp"
          android:layout_height="319dp"
          android:layout_marginTop="124dp"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"&gt;
  
  
          &lt;Button
              android:id="@+id/button2"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="@drawable/signupfrontbackground"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintHorizontal_bias="1.0"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent"
              app:layout_constraintVertical_bias="0.0"
  
              /&gt;
  
          &lt;EditText
              android:id="@+id/editText1"
              android:layout_width="wrap_content"
              android:layout_height="62dp"
              android:layout_marginTop="24dp"
              android:drawableRight="@drawable/ic_user_male_black_shape"
              android:ems="10"
              android:hint="User name"
              android:inputType="textPersonName"
              android:translationZ="2dp"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintHorizontal_bias="0.505"
              app:layout_constraintStart_toStartOf="parent"
  
              app:layout_constraintTop_toTopOf="parent" /&gt;
  
          &lt;EditText
              android:id="@+id/editText2"
              android:layout_width="wrap_content"
              android:layout_height="56dp"
              android:drawableRight="@drawable/ic_envelope"
              android:ems="10"
              android:hint="@string/app_Email"
              android:inputType="textEmailAddress"
              android:translationZ="2dp"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintHorizontal_bias="0.505"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent"
              app:layout_constraintVertical_bias="0.329" /&gt;
  
          &lt;EditText
              android:id="@+id/editText3"
              android:layout_width="wrap_content"
              android:layout_height="59dp"
              android:layout_marginTop="140dp"
              android:drawableRight="@drawable/ic_key"
              android:ems="10"
              android:hint="@string/app_Password"
              android:inputType="textPassword"
              android:translationZ="2dp"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintHorizontal_bias="0.505"
  
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="@+id/button2" /&gt;
  
  
          &lt;EditText
              android:id="@+id/editText4"
              android:layout_width="wrap_content"
              android:layout_height="60dp"
              android:layout_marginTop="200dp"
              android:drawableRight="@drawable/ic_key"
              android:ems="10"
              android:hint="@string/app_Confirm_password"
              android:inputType="textPassword"
              android:translationZ="2dp"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintHorizontal_bias="0.505"
  
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="@+id/button2"
  
              /&gt;
  
  
      &lt;/android.support.constraint.ConstraintLayout&gt;
  
      &lt;Button
          android:id="@+id/button"
          android:layout_width="128dp"
          android:layout_height="38dp"
          android:layout_marginBottom="44dp"
          android:layout_marginEnd="116dp"
          android:layout_marginRight="116dp"
          android:background="@drawable/signupbutton"
          android:text="@string/app_singup"
          android:textColor="@color/colorwhite"
          android:translationZ="2dp"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
  
          /&gt;
  
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <h1>my style</h1>
  
  <pre><code>   &lt;resources&gt;
  
      &lt;!-- Base application theme. --&gt;
      &lt;style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"&gt;
          &lt;!-- Customize your theme here. --&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;/style&gt;
  
  
  
          &lt;dimen name="topRightRadius"&gt;65dp&lt;/dimen&gt;
          &lt;dimen name="textSize"&gt;20dp&lt;/dimen&gt;
  
  
      &lt;style name="first"&gt;
  
            &lt;item name="android:topRightRadius"&gt;@dimen/topRightRadius&lt;/item&gt;
            &lt;!--&lt;item name="android:radius"&gt;65dp&lt;/item&gt;--&gt;
            &lt;item name="android:background"&gt;@color/colorAccent&lt;/item&gt;
  
  
  
      &lt;/style&gt;
  
      &lt;style name="Longin"&gt;
  
          &lt;item name="android:textColor"&gt;@color/colorwhiteblack&lt;/item&gt;
          &lt;item name="android:textSize"&gt;20dp&lt;/item&gt;
  
      &lt;/style&gt;
  
  
  &lt;/resources&gt;
  </code></pre>
  
  <h1>Manifest</h1>
  
  <pre><code>         &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.ali.myapplication"&gt;
  
  
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:roundIcon="@mipmap/ic_launcher_round"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name=".MainActivity"
              android:theme="@style/Theme.AppCompat.DayNight.NoActionBar"
              &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;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <h1>my string</h1>
  
  <pre><code>       &lt;resources&gt;
      &lt;string name="app_name"&gt;My Doctor&lt;/string&gt;
      &lt;string name="app_loging"&gt;Login&lt;/string&gt;
      &lt;string name="app_singup"&gt;Sign up&lt;/string&gt;
      &lt;string name="app_Email"&gt;Email&lt;/string&gt;
      &lt;string name="app_Password"&gt;Password&lt;/string&gt;
      &lt;string name="app_Confirm_password"&gt;Confirm password&lt;/string&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <h1>my Color</h1>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;    &lt;resources&gt;
      &lt;color name="colorPrimary"&gt;#3F51B5&lt;/color&gt;
      &lt;color name="colorPrimaryDark"&gt;#303F9F&lt;/color&gt;
      &lt;color name="colorAccent"&gt;#FF4081&lt;/color&gt;
      &lt;color name="colorwhite"&gt;#ffffff&lt;/color&gt;
      &lt;color name="colortoowhite"&gt;#efe9e9&lt;/color&gt;
      &lt;color name="colorblack"&gt;#0d0c0c&lt;/color&gt;
      &lt;color name="colorwhiteblack"&gt;#c1baba&lt;/color&gt;
      &lt;color name="colorharaqua"&gt;#15c5e4&lt;/color&gt;
      &lt;color name="coloraqua"&gt;#ed1fd3e7&lt;/color&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>Structure of  my app Structure of  my app is below Structure of  my app is below</p>
  
  <p><a href="https://i.stack.imgur.com/gq537.png" rel="nofollow noreferrer">structure</a></p>
  
  <p>first</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;item   android:state_enabled="true"&gt;
  
          &lt;shape android:shape="rectangle"&gt;
              &lt;!--&lt;corners android:topRightRadius="45dp"/&gt;--&gt;
                 &lt;corners android:topLeftRadius="45dp"
                     android:topRightRadius="0.1dp"
                     android:bottomLeftRadius="45dp"
                     android:bottomRightRadius="0.1dp"/&gt;
  
  
              &lt;gradient   android:gradientRadius="45dp"
                  android:angle="-90" android:startColor="#5a92f0"
                  android:endColor="@color/colorAccent" /&gt;
  
          &lt;/shape&gt;
      &lt;/item&gt;
  
  
  &lt;/selector&gt;
  </code></pre>
  
  <p>signupfrontbackground</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape ="rectangle"&gt;
  
  
  
        &lt;corners android:radius="20dp"/&gt;
  
         &lt;solid android:color="@color/colorwhite"/&gt;
  
       &lt;stroke
           android:color="@color/colortoowhite"
           android:width="1dp"
  
           /&gt;
  
         &lt;!--&lt;padding--&gt;
             &lt;!--android:right="10dp"--&gt;
             &lt;!--android:bottom="10dp"--&gt;
             &lt;!--android:left="10dp"--&gt;
             &lt;!--android:top="10dp"/&gt;--&gt;
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>signupbutton</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"&gt;
  
  
  
  
  
      &lt;gradient
          android:startColor="@color/colorharaqua"
          android:endColor="@color/coloraqua"
          android:angle="360"
          /&gt;
  
      &lt;corners android:topLeftRadius="105dp"
               android:bottomLeftRadius="105dp"
               android:topRightRadius="95dp"
               android:bottomRightRadius="95dp"
  
          /&gt;
  
  &lt;/shape&gt;
  </code></pre>