我之前在另一个应用程序上设置了 AdWhirl,但现在由于某种原因它不适合我。
我设置了 AdMob 并检索了 publisherID,然后将其添加到 AdWhirl 网站,并配置了百分比,但我没有看到任何广告。我什至没有看到测试广告。
我这样做:
public class Juggle2 extends Activity {
//...
AdWhirlLayout _ad;
public MainMenu mm;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
_ad = new AdWhirlLayout(this,"4ae6c5e2da3a4f20898312265874b1d3");
RelativeLayout.LayoutParams adWhirlLayoutParams = new RelativeLayout.LayoutParams(320, 52);
RelativeLayout rl = new RelativeLayout(this);
rl.addView(_ad,adWhirlLayoutParams);
mm = new MainMenu(this);
rl.addView(mm);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(rl); //Start the menu
}
然后我明白了。
06-03 22:28:07.284: D/AdWhirl SDK(17832): Showing ad:
06-03 22:28:07.284: D/AdWhirl SDK(17832): nid: 405f63ed17714f3a9f24393ae7767199
06-03 22:28:07.284: D/AdWhirl SDK(17832): name: admob
06-03 22:28:07.284: D/AdWhirl SDK(17832): type: 1
06-03 22:28:07.284: D/AdWhirl SDK(17832): key: a151ad4db66993b
06-03 22:28:07.284: D/AdWhirl SDK(17832): key2:
06-03 22:28:07.284: D/AdWhirl SDK(17832): Valid adapter, calling handle()
06-03 22:28:07.342: I/webclipboard(17832): clipservice: android.sec.clipboard.ClipboardExManager@4055be38
06-03 22:28:07.354: W/AdWhirl SDK(17832): Caught an exception in adapter:
06-03 22:28:07.354: W/AdWhirl SDK(17832): java.lang.NoSuchMethodError: com.google.ads.AdRequest.setGender
06-03 22:28:07.354: W/AdWhirl SDK(17832): at com.adwhirl.adapters.GoogleAdMobAdsAdapter.requestForAdWhirlLayout(GoogleAdMobAdsAdapter.java:86)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at com.adwhirl.adapters.GoogleAdMobAdsAdapter.handle(GoogleAdMobAdsAdapter.java:60)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at com.adwhirl.adapters.AdWhirlAdapter.handle(AdWhirlAdapter.java:168)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at com.adwhirl.AdWhirlLayout.handleAd(AdWhirlLayout.java:231)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at com.adwhirl.AdWhirlLayout.access$300(AdWhirlLayout.java:53)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at com.adwhirl.AdWhirlLayout$HandleAdRunnable.run(AdWhirlLayout.java:399)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at android.os.Handler.handleCallback(Handler.java:587)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at android.os.Handler.dispatchMessage(Handler.java:92)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at android.os.Looper.loop(Looper.java:130)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at android.app.ActivityThread.main(ActivityThread.java:3687)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at java.lang.reflect.Method.invokeNative(Native Method)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at java.lang.reflect.Method.invoke(Method.java:507)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
06-03 22:28:07.354: W/AdWhirl SDK(17832): at dalvik.system.NativeStart.main(Native Method)
06-03 22:28:07.354: D/WML_SISO(17832): InitPasteboardJni
06-03 22:28:07.358: E/AdWhirl SDK(17832): nextRation is null!
06-03 22:28:07.358: D/AdWhirl SDK(17832): Will call rotateAd() in 30 seconds
06-03 22:28:11.635: W/IInputConnectionWrapper(17832): getExtractedText on inactive InputConnection
06-03 22:28:11.659: W/IInputConnectionWrapper(17832): getExtractedText on inactive InputConnection