title: android.view.InflateException: Binary XML file line #134: Error inflating class <unknown>
body: <p>I am using AdMob in my main application. But when i start some service i get exception: <code>android.view.InflateException: Binary XML file line #134: Error inflating class &lt;unknown&gt;</code></p>
  
  <p><code>main</code> AdMob layout</p>
  
  <pre><code>&lt;LinearLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:gravity="bottom"
          android:orientation="vertical" &gt;
  
          &lt;com.google.ads.AdView
              xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
              android:id="@+id/adView"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              ads:adSize="SMART_BANNER"
              ads:adUnitId="xxx"
              android:gravity="bottom" /&gt;
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and then when i run service which call this code:</p>
  
  <pre><code>private View getMainLayout() {
          LayoutInflater inflater = (LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
          View layout = inflater.inflate(R.layout.main, null);
  
          return layout;
      }
  </code></pre>
  
  <p>i get exception:</p>
  
  <pre><code>01-26 07:55:56.500: W/dalvikvm(21075): threadid=1: thread exiting with uncaught exception (group=0x40c7a1f8)
  01-26 07:55:56.655: E/AndroidRuntime(21075): FATAL EXCEPTION: main
  01-26 07:55:56.655: E/AndroidRuntime(21075): java.lang.RuntimeException: Unable to create service com.xxx.sss.service.SmsService: android.view.InflateException: Binary XML file line #134: Error inflating class &lt;unknown&gt;
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2274)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.app.ActivityThread.access$1600(ActivityThread.java:127)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.os.Handler.dispatchMessage(Handler.java:99)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.os.Looper.loop(Looper.java:137)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.app.ActivityThread.main(ActivityThread.java:4511)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at java.lang.reflect.Method.invokeNative(Native Method)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at java.lang.reflect.Method.invoke(Method.java:511)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at dalvik.system.NativeStart.main(Native Method)
  01-26 07:55:56.655: E/AndroidRuntime(21075): Caused by: android.view.InflateException: Binary XML file line #134: Error inflating class &lt;unknown&gt;
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.view.LayoutInflater.createView(LayoutInflater.java:606)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at com.xxx.sss.service.SmsService.getMainLayout(SmsService.java:79)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at com.xxx.sss.service.SmsService.setOnLabelOnButton(SmsService.java:68)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at com.xxx.sss.service.SmsService.onCreate(SmsService.java:37)
  01-26 07:55:56.655: E/AndroidRuntime(21075):    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2264)
  </code></pre>
  
  <p>what is wrong?</p>