java.lang.NoClassDefFoundError: com.google.ads.AdView [英] java.lang.NoClassDefFoundError: com.google.ads.AdView

查看:33
本文介绍了java.lang.NoClassDefFoundError: com.google.ads.AdView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的应用中加入 admob 广告.到目前为止,我已经添加了以下代码在我的应用程序的主要活动的 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.我已经看到了对该问题的假设解释和解决方法 here 但我看不出它如何适用于我的项目,因为我的项目中没有lib"或libs"目录.

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.

推荐答案

只需手动创建libs"文件夹,然后在那里添加您的库.默认情况下,它们不存在

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆