简体   繁体   English

AdMob和ActionBarSherlock

[英]AdMob and ActionBarSherlock

I have an android app that uses ActionbarSherlock and I want to put an ad at the bottom of a ListView screen. 我有一个使用ActionbarSherlock的android应用,我想在ListView屏幕的底部放一个广告。

I have followed the information available here https://developers.google.com/mobile-ads-sdk/docs/android/fundamentals and it doesn't compile saying "java.lang.NoClassDefFoundError: com.google.ads.AdView" 我已经关注了这里提供的信息https://developers.google.com/mobile-ads-sdk/docs/android/fundamentals ,它没有编译为“ java.lang.NoClassDefFoundError:com.google.ads.AdView”

So my question is: What do I have to do to get the ad to work? 所以我的问题是:如何使广告正常工作?

You have what ADT version? 您有什么ADT版本? 17? 17吗? If so try to rename the lib folder to libs 如果是这样,请尝试将lib文件夹重命名为libs

The ADT 17 of Android Tools requires the /lib folder to be /libs. Android Tools的ADT 17要求/ lib文件夹为/ libs。

This problem is due to the fact: 此问题是由于以下事实造成的:

that libraries are not managed the same way with the new ADT build. 与新的ADT构建不同,对库的管理方式也不相同。 Instead of having 2 different managements of libraries (one for Android Library Projects, one for the standard jars), now both are merged into the Android Dependencies item. 现在,它们不再具有2种不同的库管理(一种用于Android库项目,一种用于标准jar),现在都被合并到Android Dependencies项目中。

See more information in this link 此链接中查看更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM