简体   繁体   English

AdWhirl未显示AdMob广告

[英]AdWhirl not showing AdMob ads

I have integrated AdWhirl in my project and i want to display only Admob right now. 我已经在我的项目中集成了AdWhirl,我现在只想显示Admob。
But only one ad is shown...no other ads are coming....in LogCat it is refreshing ads after 30 seconds but they are not shown on the screen. 但是只显示了一个广告...没有其他广告即将推出....在LogCat中,它是30秒后的刷新广告,但它们不会显示在屏幕上。
I am using the same coding as on the official website of the AdWhirl. 我使用与AdWhirl官方网站相同的编码。
Please tell me how i can do this... I need it very urgent. 请告诉我如何做到这一点......我非常迫切需要它。

  <LinearLayout
    android:id="@+id/layout_main"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="5dp"
    android:orientation="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="" />

    <com.adwhirl.AdWhirlLayout
        android:id="@+id/adwhirl_layout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />
</LinearLayout> 

And this is in my Main Class: 这是我的主要课程:

    try
    {
        AdWhirlManager.setConfigExpireTimeout(1000 * 60 * 5);

        AdWhirlTargeting.setAge(23);
 //         AdWhirlTargeting.setGender(AdWhirlTargeting.Gender.MALE);
  //            AdWhirlTargeting.setKeywords("online games gaming");
 //         AdWhirlTargeting.setPostalCode("94123");
        AdWhirlTargeting.setTestMode(false);

        AdWhirlLayout adWhirlLayout = (AdWhirlLayout) findViewById(R.id.adwhirl_layout);
//          TextView textView = new TextView(this);

        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);

        int diWidth = 320;
        int diHeight = 52;
        int density = (int) getResources().getDisplayMetrics().density;

        adWhirlLayout.setAdWhirlInterface(this);
        adWhirlLayout.setMaxWidth((int) (diWidth * density));
        adWhirlLayout.setMaxHeight((int) (diHeight * density));

        layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
//          textView.setText("");

        LinearLayout layout = (LinearLayout) findViewById(R.id.layout_main);
        layout.setGravity(Gravity.CENTER_HORIZONTAL);
        layout.addView(adWhirlLayout, layoutParams);
//          layout.addView(textView, layoutParams);
//          layout.invalidate();
    }
    catch (Exception e)
    {
        Log.e("error", e.toString());
    }    

EDIT: 编辑:
I forgot to add in the question earlier. 我忘了先加问题。
This is my manifest.xml file 这是我的manifest.xml文件

<meta-data
        android:name="ADWHIRL_KEY"
        android:value="My_KEY" />

You are missing AdWhirl key in your Android Manifest 您在Android Manifest中缺少AdWhirl键

Be sure your AdWhirl key is in the Manifest as well (either within the <activity> , or <application> tags): 确保您的AdWhirl密钥也在Manifest中(在<activity><application>标记内):

<meta-data android:value="Your Key"
     android:name="ADWHIRL_KEY"/>

It looks like you simply aren't getting any inventory (ads) from all the networks. 看起来您根本没有从所有网络获得任何广告资源(广告)。 Are you sure you set them up correctly in the AdWhirl control panel thing? 您确定在AdWhirl控制面板中正确设置了它们吗?

Check out these instructions to add your APP and also register the Ad networks. 查看这些说明以添加您的APP并注册广告网络。 You have to make an account with each of the ad networks also. 您还必须为每个广告网络创建一个帐户。

Also do check for Network Libraries are they correctly installed ? 还检查网络库是否正确安装?

Check this Adwhirl : AdWhirl Open Source SDK and Server to add your APP and also register the Ad networks . 检查此Adwhirl:AdWhirl开源SDK和服务器以添加您的APP并register Ad networks

You have to make an account with each of the ad networks also. 您还必须为每个广告网络创建一个帐户。

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

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