title: android.view.InflateException: Binary XML file line #30: Error inflating class <unknown>
body: <p>I am running a application which opens up with a map, with a marker on it. </p>
  
  <p>On clicking on the marker I am trying to open a dialog with some fields in it. This is my code for marker click,</p>
  
  <pre><code>public boolean onMarkerClick(Marker arg0) {
  
      Log.d("", "here");
      View view = getLayoutInflater().inflate(R.layout.dialogview, null);
      view.setBackgroundColor(Color.LTGRAY);
      edtDate = (TextView) view.findViewById(R.id.edtDate);
  
      edtTime = (TextView) view.findViewById(R.id.edtTime);
  
      Dialog dialog = new Dialog(this,
              android.R.style.TextAppearance_Holo_WindowTitle);
      dialog.setTitle("Enter Details");
      LayoutParams lp = dialog.getWindow().getAttributes();
      lp.width = WindowManager.LayoutParams.MATCH_PARENT;
      lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
      lp.gravity = Gravity.TOP | Gravity.LEFT;
      lp.dimAmount = 0;
      lp.flags = LayoutParams.FLAG_LAYOUT_NO_LIMITS
              | LayoutParams.FLAG_NOT_TOUCH_MODAL;
  
      Spinner ddlspinnerdata = (Spinner) view.findViewById(R.id.ddl);
      ddldata = ddlspinnerdata.getSelectedItem().toString();
      EditText edtname = (EditText) view.findViewById(R.id.personname);
      name = edtname.getText().toString();
      EditText edtLength = (EditText) view.findViewById(R.id.edtlength);
      length = edtLength.getText().toString();
      EditText edtWidth = (EditText) view.findViewById(R.id.edtwidth);
      width = edtWidth.getText().toString();
      EditText edtHeight = (EditText) view.findViewById(R.id.edtheight);
      height = edtHeight.getText().toString();
      date = edtDate.getText().toString();
      time = edtTime.getText().toString();
  
      dialog.setContentView(view);
      dialog.show();
           }
  </code></pre>
  
  <p>I am getting this error when I click on marker. I am running this app in android 4.0.4 version. 
    This is my logcat,</p>
  
  <pre><code>09-19 10:51:19.302: E/AndroidRuntime(16414): FATAL EXCEPTION: main
  09-19 10:51:19.302: E/AndroidRuntime(16414): android.view.InflateException: Binary XML file line #30: Error inflating class &lt;unknown&gt;
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at    android.view.LayoutInflater.createView(LayoutInflater.java:608)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:682)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:741)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:744)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.view.LayoutInflater.inflate(LayoutInflater.java:491)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2725)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2785)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:269)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:263)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.app.Dialog.setContentView(Dialog.java:480)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at com.example.gm.MainActivity.onMarkerClick(MainActivity.java:157)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at com.google.android.gms.maps.GoogleMap$7.a(Unknown Source)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at com.google.android.gms.internal.da$a.onTransact(Unknown Source)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.os.Binder.transact(Binder.java:297)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at bmb.a(SourceFile:84)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at maps.ag.bn.a(Unknown Source)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at maps.ap.d.a(Unknown Source)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at maps.ap.p.c(Unknown Source)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at maps.ap.o.a(Unknown Source)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at maps.ap.bo.b(Unknown Source)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at maps.ap.bk.onSingleTapConfirmed(Unknown Source)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at maps.bt.g.onSingleTapConfirmed(Unknown Source)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at maps.bt.i.handleMessage(Unknown Source)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.os.Handler.dispatchMessage(Handler.java:99)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.os.Looper.loop(Looper.java:154)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.app.ActivityThread.main(ActivityThread.java:4624)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at java.lang.reflect.Method.invokeNative(Native Method)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at java.lang.reflect.Method.invoke(Method.java:511)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at dalvik.system.NativeStart.main(Native Method)
  09-19 10:51:19.302: E/AndroidRuntime(16414): Caused by: java.lang.reflect.InvocationTargetException
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at java.lang.reflect.Constructor.constructNative(Native Method)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.view.LayoutInflater.createView(LayoutInflater.java:588)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    ... 32 more
  09-19 10:51:19.302: E/AndroidRuntime(16414): Caused by: android.view.InflateException: Binary XML file line #36: Error inflating class &lt;unknown&gt;
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.view.LayoutInflater.createView(LayoutInflater.java:608)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:57)
  09-19 10:51:19.302: E/AndroidRuntime(16414):    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:655)
  </code></pre>
  
  <p>This is my dialogview.xml,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/lldialog"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  android:paddingBottom="10dp"
  android:paddingLeft="10dp"
  android:paddingRight="10dp"
  android:paddingTop="30dp" &gt;
  
  &lt;Spinner
      android:id="@+id/ddl"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="14dp"
      android:entries="@array/items"
      android:prompt="@string/ChooseOption"
      android:scrollbarStyle="outsideOverlay"
      android:scrollbars="horizontal|vertical" /&gt;
  
  &lt;EditText
      android:id="@+id/personname"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:hint="Full Name"
      android:ems="10"
      android:inputType="textPersonName" &gt;
  
      &lt;requestFocus android:layout_width="wrap_content" /&gt;
  &lt;/EditText&gt;
  
  &lt;EditText
      android:id="@+id/edtlength"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
     android:hint="Length"
      android:ems="10"
      android:inputType="numberSigned" /&gt;
  
  &lt;EditText
      android:id="@+id/edtwidth"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"            
      android:ems="10"
      android:hint="Width"
      android:inputType="numberSigned" /&gt;
  
  &lt;EditText
      android:id="@+id/edtheight"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"       
      android:ems="10"
      android:hint="Height"
      android:inputType="numberSigned" /&gt;
  
  &lt;TextView
      android:id="@+id/edtDate"
      android:layout_width="match_parent"
      android:layout_height="40dp"
      android:ems="10"
      android:gravity="center|fill"
      android:hint="Pick Date"
      android:inputType="date"
      android:paddingLeft="10dp"
      android:textSize="20sp" /&gt;
  
  &lt;TextView
      android:id="@+id/edtTime"
      android:layout_width="match_parent"
      android:layout_height="40dp"
      android:ems="10"
      android:gravity="center|fill"
      android:hint="Pick Time"
      android:inputType="time"
      android:paddingLeft="10dp"
      android:textSize="20sp" /&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal" &gt;
  
      &lt;Button
          android:id="@+id/btnsave"
          style="?android:attr/buttonStyleSmall"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="2"
          android:text="Save"
          android:textSize="20sp" /&gt;
  
      &lt;Button
          android:id="@+id/btncancel"
          style="?android:attr/buttonStyleSmall"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="2"
          android:text="Cancel"
          android:textSize="20sp" /&gt;
  
    &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>This is my manifest file,</p>
  
  <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.gm"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="18" /&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  &lt;uses-permission android:name="com.example.gm.permission.MAPS_RECEIVE" /&gt;
  &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;
  &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"/&gt;
    &lt;uses-feature
      android:glEsVersion="0x00020000"
      android:required="true" /&gt;
  
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.example.gm.MainActivity"
          android:label="@string/app_name" &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;meta-data
          android:name="com.google.android.maps.v2.API_KEY"
          android:value="MY_API_KEY" /&gt;
  
    &lt;uses-library android:name="com.google.android.maps" /&gt;
   &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>I am using a mapfragment here.</p>
  
  <pre><code> &lt;fragment
      android:id="@+id/map"
      android:name="com.google.android.gms.maps.SupportMapFragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_alignParentTop="true"
      android:clickable="true" /&gt;
  </code></pre>
  
  <p>In the main activity I am extending FragmentActivity. Is this causing an exception? Please clarify me. 
   Please help me out why I am getting this error. </p>
  
  <p>Any help is appreciated. Thanks!!</p>