java.lang.NoClassDefFoundError的:com.google.ads.AdView [英] java.lang.NoClassDefFoundError: com.google.ads.AdView
问题描述
我试图将AdMob的广告在我的应用程序。到目前为止,我已经添加了以下code 在我的应用程序的主要活动的onCreate方法...
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 = new AdView(this,AdSize.BANNER,"my code number");
adView.loadAd(new AdRequest());
该程序没有错误,但在运行时我得到的消息编译 java.lang.NoClassDefFoundError的:com.google.ads.AdView
。我已经看到了问题的一个假设的解释和治愈的这里,但我看不出它是如何适用于我的项目,因为我没有我的项目中有一张lib目录或库目录。
The program compiles without error but at run time I get the message java.lang.NoClassDefFoundError: com.google.ads.AdView
. I have seen a supposed explanation of the problem and the cure here but I could not see how it was applicable to my project because I do not have either a "lib" or "libs" directory within my project.
根据Eclipse的SDK管理器,我有最先进的最新版本,我使用的一切。
According to eclipse's SDK manager, I have the most up to date version of everything that I use.
推荐答案
只需手工打造的库文件夹,并添加您的图书馆有。缺省情况下,它们不存在
Just create manually the "libs" folder, and add your libraries there. By default, they doesn't exist
这篇关于java.lang.NoClassDefFoundError的:com.google.ads.AdView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!