2014-02-25 32 views
0

我最近决定把广告放在我的android应用程序上。我看到的问题是,当我第一次打开应用时,我只能看到“一个”广告。之后,我再也无法在其他地方看到广告了。它只是保持空白!admob填充率问题为Android

根据admob,我得到了100%的填充率,这没有任何意义。

这是我的logcat输出。

02-25 10:53:24.528: E/GooglePlayServicesUtil(8346): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. 
02-25 10:53:24.548: E/GooglePlayServicesUtil(8346): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. 
02-25 10:53:24.548: E/GooglePlayServicesUtil(8346): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. 
02-25 10:53:24.608: D/dalvikvm(1004): GC_CONCURRENT freed 393K, 18% free 18014K/21928K, paused 2ms+1ms, total 18ms 
02-25 10:53:25.278: I/Ads(8346): Scheduling ad refresh 60000 milliseconds from now. 
02-25 10:53:25.278: I/Ads(8346): Ad finished loading. 
02-25 10:53:25.298: I/chromium(8346): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported 
02-25 10:53:25.318: I/chromium(8346): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported 
02-25 10:53:35.268: E/qcom_sensors_hal(767): hal_process_report_ind: Bad item quality: 11 
02-25 10:53:48.698: I/Ads(8346): Ad is not visible. Not refreshing ad. 
02-25 10:53:48.698: I/Ads(8346): Scheduling ad refresh 60000 milliseconds from now. 

我不确定发生了什么事。

这是我的xml布局。

<com.google.android.gms.ads.AdView android:id="@+id/adView" 
         android:layout_below="@+id/video" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        ads:adUnitId="stuff" 
        ads:adSize="BANNER" 
        android:layout_centerHorizontal="true"/> 

这里是我的代码

AdView adView = (AdView)findViewById(R.id.adView); 
    AdRequest adRequest = new AdRequest.Builder().build(); 
    adView.loadAd(adRequest); 

注:我使用的代码在OnCreate中的一项活动,在onactivitycreated()对我的片段。我在我的应用中为所有广告使用了相同的adunitID。

Admob表示,它已经以100%的填充率提供了超过10000次的展示。

回答

0

尝试以编程方式添加unitId和adSize,而不是像this的谷歌代码示例。

1

日志似乎声明AdView的不可见:

02-25 10:53:48.698: I/Ads(8346): Ad is not visible. Not refreshing ad. 

您还没有发布够了你的布局或代码的工作为什么。