when I try to get admob in my app, My app get force close
<p>Hi I am trying to add admob for my app for first time. I have read many information (including stackOverFlow). However I still have not got any luck. My app get force close.
Here is how I tried up to so far.</p>

<p>Androidmanifest.xml</p>

<p>I have added these lines within application tag</p>

<pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
&lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
</code></pre>

<p>And I aslo I added following line just before </p>

<pre><code>&lt;Meta-Data android:value="a14f9xxxxx(id from admob)" android:name="ADMOB_PUBLISHER_ID"/&gt;
</code></pre>

<p>attr.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
    &lt;declare-styleable name="com.admob.android.ads.AdView"&gt;            
       &lt;attr name="backgroundColor" format="color" /&gt;
       &lt;attr name="primaryTextColor" format="color" /&gt;
       &lt;attr name="secondaryTextColor" format="color" /&gt;
       &lt;attr name="keywords" format="string" /&gt;
       &lt;attr name="refreshInterval" format="integer" /&gt;
    &lt;/declare-styleable&gt;
  &lt;/resources&gt;
</code></pre>

<p>frontpage.xml (layout for my frontpage activity</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:myapp="http://schemas.android.com/apk/res/simple.stocktaketrial"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:orientation="vertical" &gt;
...
some other layout and components here
...

&lt;com.admob.android.ads.AdView     
       android:id="@+id/ad" 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content"
       myapp:backgroundColor="#000000"
       myapp:primaryTextColor="#FFFFFF"
       myapp:secondaryTextColor="#CCCCCC"
/&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>I added GoogleAdMobAdsSdk-6.0.0 in lib folder and built pass.</p>

<p>What I am doing wrong??</p>

<p>I have read the way of adding admob in xml in layout is better than adding codes to java. So if it is true I would like to keep it in the way.</p>

<p>Thanks you for your kind help in advance.</p>

<p>here is the logcat out put.</p>

<pre><code>06-27 12:24:56.630: E/AndroidRuntime(25265): FATAL EXCEPTION: main
06-27 12:24:56.630: E/AndroidRuntime(25265): java.lang.RuntimeException: Unable to start activity ComponentInfo{simple.stocktaketrial/simple.stocktaketrial.FrontPage}: android.view.InflateException: Binary XML file line #77: Error inflating class com.admob.android.ads.AdView
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.os.Handler.dispatchMessage(Handler.java:99)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.os.Looper.loop(Looper.java:123)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.app.ActivityThread.main(ActivityThread.java:4627)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at java.lang.reflect.Method.invokeNative(Native Method)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at java.lang.reflect.Method.invoke(Method.java:521)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at dalvik.system.NativeStart.main(Native Method)
06-27 12:24:56.630: E/AndroidRuntime(25265): Caused by: android.view.InflateException: Binary XML file line #77: Error inflating class com.admob.android.ads.AdView
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.app.Activity.setContentView(Activity.java:1647)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at simple.stocktaketrial.FrontPage.onCreate(FrontPage.java:25)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-27 12:24:56.630: E/AndroidRuntime(25265):    ... 11 more
06-27 12:24:56.630: E/AndroidRuntime(25265): Caused by: java.lang.ClassNotFoundException: com.admob.android.ads.AdView in loader dalvik.system.PathClassLoader[/data/app/simple.stocktaketrial-2.apk]
06-27 12:24:56.630: E/AndroidRuntime(25265):    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
06-27 12:24:56.630: E/AndroidRuntime(25265):    at android.view.LayoutInflater.createView(LayoutInflater.java:466)
06-2 7 12:24:56.630: E/AndroidRuntime(25265):   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
06-27 12:24:56.630: E/AndroidRuntime(25265):    ... 20 more
</code></pre>
