title: Error inflating class TextView
body: <p>i am new to android development and having trouble getting past this build error; Log</p>
  
  <pre><code>11-17 11:37:58.520 8894-8894/com.example.android.ocee E/AndroidRuntime: FATAL EXCEPTION: main
                                                                          Process: com.example.android.ocee, PID: 8894
                                                                          java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.ocee/com.example.android.ocee.MainActivity}: android.view.InflateException: Binary XML file line #61: Error inflating class TextView
                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2436)
                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2498)
                                                                              at android.app.ActivityThread.access$900(ActivityThread.java:179)
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1324)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                              at android.os.Looper.loop(Looper.java:146)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5641)
                                                                              at java.lang.reflect.Method.invokeNative(Native Method)
                                                                              at java.lang.reflect.Method.invoke(Method.java:515)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1288)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104)
                                                                              at dalvik.system.NativeStart.main(Native Method)
                                                                           Caused by: android.view.InflateException: Binary XML file line #61: Error inflating class TextView
                                                                              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:719)
                                                                              at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
                                                                              at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
                                                                              at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
                                                                              at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
                                                                              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
                                                                              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
                                                                              at com.example.android.ocee.MainActivity.onCreate(MainActivity.java:11)
                                                                              at android.app.Activity.performCreate(Activity.java:5484)
                                                                              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2400)
                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2498) 
                                                                              at android.app.ActivityThread.access$900(ActivityThread.java:179) 
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1324) 
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                              at android.os.Looper.loop(Looper.java:146) 
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5641) 
                                                                              at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                              at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1288) 
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104) 
                                                                              at dalvik.system.NativeStart.main(Native Method) 
                                                                           Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1
                                                                              at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:464)
                                                                              at android.widget.TextView.&lt;init&gt;(TextView.java:1497)
                                                                              at android.support.v7.widget.AppCompatTextView.&lt;init&gt;(AppCompatTextView.java:60)
                                                                              at android.support.v7.widget.AppCompatTextView.&lt;init&gt;(AppCompatTextView.java:56)
                                                                              at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
                                                                              at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:972)
                                                                              at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:1031)
                                                                              at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
                                                                              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:690)
                                                                              at android.view.LayoutInflater.rInflate(LayoutInflater.java:761) 
                                                                              at android.view.LayoutInflater.rInflate(LayoutInflater.java:769) 
                                                                              at android.view.LayoutInflater.rInflate(LayoutInflater.java:769) 
                                                                              at android.view.LayoutInflater.rInflate(LayoutInflater.java:769) 
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:498) 
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:398) 
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:354) 
                                                                              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) 
                                                                              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
                                                                              at com.example.android.ocee.MainActivity.onCreate(MainActivity.java:11) 
                                                                              at android.app.Activity.performCreate(Activity.java:5484) 
                                                                              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093) 
                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2400) 
                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2498) 
                                                                              at android.app.ActivityThread.access$900(ActivityThread.java:179) 
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1324) 
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                              at android.os.Looper.loop(Looper.java:146) 
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5641) 
                                                                              at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                              at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1288) 
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104) 
                                                                              at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>Here is the XML file: avtivity_main.xml</p>
  
  <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context="com.example.android.ocee.MainActivity"&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"&gt;
  
      &lt;RelativeLayout
          android:id="@+id/real"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;ImageView
              android:id="@+id/img"
              android:src="@drawable/occ"
              android:layout_width="match_parent"
              android:layout_height="165dp"
              android:scaleType="fitCenter"
              android:layout_marginBottom="16dp"/&gt;
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Exclusive Catalogue"
              android:fontFamily="times new roman"
              android:layout_centerHorizontal="true"
              android:textColor="#f4e000"
              android:textSize="18sp"
              android:textStyle="bold"
              android:textAllCaps="true"
              android:layout_marginTop="130dp"
              /&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/linLay2"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:orientation="vertical"
          android:layout_weight="1"&gt;
  
          &lt;LinearLayout
              android:id="@+id/linLay3"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginBottom="16dp"
              android:orientation="horizontal"
              android:background="@android:color/white"
              &gt;
  
              &lt;ImageView
                  android:layout_weight="1"
                  android:layout_width="0dp"
                  android:layout_height="100dp"
                  android:src="@drawable/ocho2"/&gt;
  
              &lt;TextView
                  android:layout_weight="2"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/holo_blue_dark"
                  android:text="Dapper Ankara n Jean Shirt"
                  /&gt;
  
              &lt;TextView
                  android:layout_weight="1"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/black"
                  android:text="N6000"/&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/linLay4"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_marginBottom="16dp"
              android:orientation="horizontal"
              android:background="@android:color/white"&gt;
  
              &lt;ImageView
                  android:layout_weight="2"
                  android:layout_width="0dp"
                  android:layout_height="100dp"
                  android:src="@drawable/ocho3"/&gt;
  
              &lt;TextView
                  android:layout_weight="2"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/holo_blue_dark"
                  android:text="Dope plain white made to fit shirt"/&gt;
  
              &lt;TextView
                  android:layout_weight="1"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/black"
                  android:text="N8000"/&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/linLay5"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              android:background="@android:color/white"&gt;
  
              &lt;ImageView
                  android:layout_weight="2"
                  android:layout_width="0dp"
                  android:layout_height="100dp"
                  android:src="@drawable/ocho4"/&gt;
  
              &lt;TextView
                  android:layout_weight="2"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/holo_blue_dark"
                  android:text="Vintage Sbyo blend of classic ankara n denim"/&gt;
  
              &lt;TextView
                  android:layout_weight="1"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/black"
                  android:text="N7000"/&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/linLay6"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              android:background="@android:color/white"
              android:layout_marginTop="8dp"&gt;
  
              &lt;ImageView
                  android:layout_weight="2"
                  android:layout_width="0dp"
                  android:layout_height="100dp"
                  android:src="@drawable/ocho"/&gt;
  
              &lt;TextView
                  android:layout_weight="2"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/holo_blue_dark"
                  android:text="Retro mix of Arztech print and 100% cotton."/&gt;
  
              &lt;TextView
                  android:layout_weight="1"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/black"
                  android:text="N7000"/&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/linLay7"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              android:background="@android:color/white"
              android:layout_marginTop="8dp"&gt;
  
              &lt;ImageView
                  android:layout_weight="2"
                  android:layout_width="0dp"
                  android:layout_height="100dp"
                  android:src="@drawable/ochocinco"/&gt;
  
              &lt;TextView
                  android:layout_weight="2"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/holo_blue_dark"
                  android:text="Classic Sbyo Ankara on Blue cotton shirt"/&gt;
  
              &lt;TextView
                  android:layout_weight="1"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/black"
                  android:text="N9000"/&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/linLay8"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              android:background="@android:color/white"
              android:layout_marginTop="8dp"&gt;
  
              &lt;ImageView
                  android:layout_weight="2"
                  android:layout_width="0dp"
                  android:layout_height="100dp"
                  android:src="@drawable/o"/&gt;
  
              &lt;TextView
                  android:layout_weight="2"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/holo_blue_dark"
                  android:text="Classic Sbyo Ankara on Blue cotton shirt"/&gt;
  
              &lt;TextView
                  android:layout_weight="1"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:textSize="?android:textAppearanceMedium"
                  android:textColor="@android:color/black"
                  android:text="N6000"/&gt;
  
          &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <p>I have checked my view hierarchy but still dont understand. Please assist me. </p>