Resource not found exception in relative layout while running the application
<p>I am creating Relative Layout which looks fine not giving any error at that time.but when i am trying to run this application I am getting the error at runtime as mentioned below.</p>

<p>The erroe is:</p>

<pre><code>   07-03 23:04:55.420: D/AndroidRuntime(20456): Shutting down VM
    07-03 23:04:55.430: W/dalvikvm(20456): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
    07-03 23:04:55.491: E/AndroidRuntime(20456): FATAL EXCEPTION: main
    07-03 23:04:55.491: E/AndroidRuntime(20456): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.customdialog/com.customdialog.CustomDialogExample}: android.view.InflateException: Binary XML file line #3: Error inflating class android.widget.RelativeLayout
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.app.ActivityThread.access$2300(ActivityThread.java:125)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.os.Handler.dispatchMessage(Handler.java:99)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.os.Looper.loop(Looper.java:123)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.app.ActivityThread.main(ActivityThread.java:4627)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at java.lang.reflect.Method.invokeNative(Native Method)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at java.lang.reflect.Method.invoke(Method.java:521)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at dalvik.system.NativeStart.main(Native Method)
    07-03 23:04:55.491: E/AndroidRuntime(20456): Caused by: android.view.InflateException: Binary XML file line #3: Error inflating class android.widget.RelativeLayout
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.view.LayoutInflater.createView(LayoutInflater.java:513)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.app.Dialog.setContentView(Dialog.java:421)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at com.customdialog.CustomizeDialog.&lt;init&gt;(CustomizeDialog.java:24)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at com.customdialog.CustomDialogExample.onCreate(CustomDialogExample.java:16)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    ... 11 more
    07-03 23:04:55.491: E/AndroidRuntime(20456): Caused by: java.lang.reflect.InvocationTargetException
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.widget.RelativeLayout.&lt;init&gt;(RelativeLayout.java:170)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at java.lang.reflect.Constructor.constructNative(Native Method)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.view.LayoutInflater.createView(LayoutInflater.java:500)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    ... 22 more
    07-03 23:04:55.491: E/AndroidRuntime(20456): Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f06000b a=-1 r=0x7f06000b}
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.content.res.Resources.loadDrawable(Resources.java:1681)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.view.View.&lt;init&gt;(View.java:1885)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.view.View.&lt;init&gt;(View.java:1834)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:285)
    07-03 23:04:55.491: E/AndroidRuntime(20456):    ... 26 more
</code></pre>

<p>Here is my CustomDialogExample class.</p>

<pre><code> public class CustomDialogExample extends Activity {
    /** Called when the activity is first created. */
        CustomizeDialog customizeDialog;
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    /** Display Custom Dialog */
    customizeDialog = new CustomizeDialog(CustomDialogExample.this);
    Log.i("Log", "show method called");
    customizeDialog.show();

    }
    }
</code></pre>

<p>And Here is the CustomizeDialog.class by which the dialog box is created..</p>

<pre><code>public class CustomizeDialog extends Dialog{

    Button dialogButtonYes;
    Button dialogButtonNo;
    TextView textView,titleText,customtitle;
    public CustomizeDialog(Context context){
        super(context);

        requestWindowFeature(Window.FEATURE_NO_TITLE);

        /** Design the dialog in main.xml file */
        setContentView(R.layout.relative);
        dialogButtonYes = (Button) findViewById(R.id.buttonCustomDialogYes);
        dialogButtonNo = (Button) findViewById(R.id.buttonCustomDialogNo);
        textView = (TextView) findViewById(R.id.textViewCustomTitle);
        //customtitle.setText(title);
        textView.setText("ffg");
}
}
</code></pre>

<p>And the relative.xml layout xml file is:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@style/HeadingTheme"
    android:layout_centerHorizontal="true" &gt;
    &lt;TextView
        android:id="@+id/textViewCustomTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="ABCD"/&gt;
    &lt;LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/textViewCustomTitle"
        android:orientation="horizontal"
        android:paddingBottom="1.0dip"
        android:paddingLeft="4.0dip"
        android:paddingRight="4.0dip"
        android:paddingTop="5.0dip" &gt;
        &lt;Button
            android:id="@+id/buttonCustomDialogYes"
            android:layout_width="0.0dp"
            android:layout_height="fill_parent"
            android:layout_weight="1.0"
            android:text="Yes" /&gt;
        &lt;Button
        android:id="@+id/buttonCustomDialogNo"
           android:layout_width="0.0dp"
            android:layout_height="fill_parent"
            android:layout_weight="1.0"
            android:text="No" /&gt;
    &lt;/LinearLayout&gt;
&lt;/RelativeLayout&gt;
</code></pre>

<p>Please let me know if anybody is facing this problem and the solution also they tried to resolve this problem</p>

<p>Thanks in advance..</p>
