Adwhirl广告不显示

时间:2013-06-04 04:39:11

标签: android admob adwhirl

我之前在其他应用上设置了AdWhirl,但现在因为某种原因它不适合我。

我已经设置了AdMob并检索了发布商ID,然后将其添加到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

1 个答案:

答案 0 :(得分:1)

请确保您针对最新版本的AdMob / AdWhirl SDK进行编译。

AdMob SDK在某些时候更改了其AdRequest设置器方法,例如setGender以返回AdRequest而不是void。然后更新AdWhirl以针对新版SDK进行编译。

因此,如果你有一个针对void setGender()方法编译的AdWhirl版本,但是与AdRequest setGender()捆绑在一起的AdMob SDK(反之亦然),则会出现此错误。