androidadmobadwhirl

Adwhirl ads don't show


I've set up AdWhirl before on another app, but now it's not working for me for some reason.

I've set up AdMob and retrieved the publisherID, then added it into the AdWhirl site, and configured the percentage, but I don't see any ads. I don't even see test ads.

I do this:

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

    }

Then I get this.

    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

Solution

  • Make sure you're compiling against the latest versions of the AdMob/AdWhirl SDK.

    The AdMob SDK at some point changed their AdRequest setter methods, such as setGender to return the AdRequest instead of being void. AdWhirl then updated to compile against the new version of the SDK.

    So if you have an AdWhirl version that was compiled against the void setGender() method, but an AdMob SDK bundled with AdRequest setGender() (or vice versa), you'll get this error.