java - AdMob - Error inflating Class com.google.gms.AdView -
I can not add ads to my Android app, I tried to work on it in the last 6 hours and research into improvements Have done, but nothing seems to work! so frustrating.
Here is the code:
setContentView (R.layout.splash); in this(); LinearLayout layout = (LinearLayout) findViewById (R.id.linearSplash); AdView = new ad view (this); AdView.setAdSize (AdSize.BANNER); AdView.setAdUnitId ("a14ff402be4457c"); Layout.addView (adview); AdRequest adRequest = New AdRequest.Builder () .addTestDevice (AdRequest.DEVICE_ID_EMULATOR) .build (); AdView.loadAd (adRequest);
But I get an error:
Unable to start activity - android.view.InflateException: Binary XML file line # 17: Enhanceing a class com Error. Google.gms.ads.AdView
Is anyone sure? I am using the Google Play services
jar file, not general adobe 6.4.1.
You have the wrong AdView
in your layout file.
You have the com.google.android.gms.ads.adview
package in your layout as Google Play services
, not your Currently (possibly com.google.gms.ads.AdView
) usage
Comments
Post a Comment