Breaking News
Home / Android / Android Issues / android.view.InflateException: Binary XML file line #50: Error inflating class com.google.ads.AdView

android.view.InflateException: Binary XML file line #50: Error inflating class com.google.ads.AdView

Issue

The app is trying to use Admob banner in the Actvity.

            <com.google.ads.AdView
                android:id=”@id/adView”
                android:layout_width=”wrap_content”
                android:layout_height=”wrap_content”
                ads:adSize=”BANNER”
                ads:adUnitId=”a1s251cdf4s7ec3″
                ads:loadAdOnCreate=”true”
                ads:testDevices=”TEST_EMULATOR, TEST_DEVICE_ID” />
        </LinearLayout>

/AndroidRuntime( 2554): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.livrona.apps.gurbani.ringtone/com.livrona.apps.gurbani.ringtone.Main}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.livrona.apps.gurbani.ringtone/com.livrona.apps.gurbani.ringtone.RingtonesActivity}: android.view.InflateException: Binary XML file line #50: Error inflating class com.google.ads.AdView

E/AndroidRuntime( 2554): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.livrona.apps.gurbani.ringtone/com.livrona.apps.gurbani.ringtone.RingtonesActivity}: android.view.InflateException: Binary XML file line #50: Error inflating class com.google.ads.AdView

E/AndroidRuntime( 2554):      at com.livrona.apps.gurbani.ringtone.Main.addTab(Main.java:47)

E/AndroidRuntime( 2554):      at com.livrona.apps.gurbani.ringtone.Main.setTabs(Main.java:29)

E/AndroidRuntime( 2554):      at com.livrona.apps.gurbani.ringtone.Main.onCreate(Main.java:25)

E/AndroidRuntime( 2554):      at com.livrona.apps.gurbani.ringtone.RingtonesActivity.onCreate(RingtonesActivity.java:36)

E/EmbeddedLogger(  586): App crashed! Process: com.livrona.apps.gurbani.ringtone

E/EmbeddedLogger(  586): App crashed! Package: com.livrona.apps.gurbani.ringtone v1 (1.0)

W/ActivityManager(  586):   Force finishing activity com.livrona.apps.gurbani.ringtone/.Main

Possible Solution

Check your Eclipse project and make sure that you have the Admob SDK lib in the class-path as shown below else download and/or add to project classpath, and then build/deploy and test you app.

Admob SDK in ClassPath<!>

[pb_builder]

Check Also

Cannot launch Call Intent – Android Permission Denial Issue

Issue When trying to invoke the Phone Dialer programmatically the following exception occurs. 10-24 11:37:41.127: …

Advertisment ad adsense adlogger