java.lang.NoClassDefFoundError: com.google.ads.AdView

前端 未结 10 963
面向向阳花
面向向阳花 2020-11-28 13:42

I am attempting to incorporate admob ads in my app. So far I have added the following code in the onCreate method of my app\'s main activity...

    adView =          


        
相关标签:
10条回答
  • 2020-11-28 14:17

    Just create manually the "libs" folder, and add your libraries there. By default, they doesn't exist

    0 讨论(0)
  • 2020-11-28 14:17

    I had a similar problem, but did not have to add the libs folder; I tried, with no success, then removed them afterwards, when I realized that I had just forgotten to export the included Jar archived.

    Fix:
    Select project settings > Java Build Path, then Order and export.

    Here, check the GoogleAdMobAdsSdk-package.

    This should solve the NoClassDefFoundError-issue.

    0 讨论(0)
  • 2020-11-28 14:18
    1. Project-> Clean
    2. Project settings -> Java Build Path. Open "Order and export" tab.
    3. Check GoogleAdMobsAdsSDK.

    It is worked for me.

    0 讨论(0)
  • 2020-11-28 14:18

    It's not enough only to add "GoogleAdMobAdsSdk-6.4.1.jar" in Java Build Path,then you should switch to table:Order and export.check the "GoogleAdMobAdsSdk-6.4.1.jar" here.

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