It seems that many people have been getting this error, and after digging through all of the posted solutions on both here and stack overflow and finding all of them do not help, I would like to ask again:
I am a first time android developer who is working on an app. I have all of my functionality working in Eclipse and in the AVD, but when I try to add AdMob ads, I can't get the program to run. It always fails with the following error:
Binary XML file line #68: Error inflating class com.google.ads.AdView
The offending xml call is:
<com.google.ads.AdView android:id="@+id/ad"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="ca-app-pub-#####################"
ads:adSize="BANNER" />
I added the google-play-services_lib project from the android resources to eclipse using the proper Import Android code and Android dependencies. That made everything compile and get me to a deployable apk, but I can't run the project because of the above exception. I feel like this is a configuration issue, but I don't know where else to look.
the following is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="
http://schemas.android.com/apk/res/android"
package="com.example.testappone"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="9" />
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.testappone.MainActivity"
android:label="@string/app_name"
android:launchMode="singleTask" >
<intent-filter>
<category android:name="android.intent.category.DEFAULT"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="howsmydriving-oauth-twitter" android:host="callback"/>
</intent-filter>
</activity>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
</manifest>
And the following is my project.properties file (with header comments stripped):
# Project target.
target=android-13
android.library.reference.1=../../../../Program Files (x86)/Android/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib