com.google.ads.AdView failed to instantiate

前端 未结 3 1250
野趣味
野趣味 2020-12-06 23:12

I have used admob sdk and added as external jar.In xml i have specified



        
相关标签:
3条回答
  • 2020-12-06 23:58

    From the documentation, you'll need to include additional configChanges in your activity (assuming you're using 4.3.1 or higher):

    <activity android:name="com.google.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
    

    If you run into issues where screenSize and smallestScreenSize aren't recognized, you'll have to compile aganist Android 3.2 or higher. Check out this migration blog post for more information on getting off of 4.1.1 to a newer version (the same applies to moving to 6.0.0 as well).

    0 讨论(0)
  • 2020-12-07 00:04

    In case someone is still viewing this thread- check if the API level you are rendering the view against is below 17. For me it worked at 17. You can change it by using the little droid just above your graphical layout.

    0 讨论(0)
  • 2020-12-07 00:08

    Have you exported the AdMob library as well?

    Go into Project Properties > Java Build Path > Order and Export

    Check that the little box next to your admob.jar is checked; if not, do so.

    0 讨论(0)
提交回复
热议问题