2011-02-01 7 views
2

AdView에 문제가 있습니다. 나는이보기로 활동을 시작하고 뭔가 영원한 루프에가는 것 같습니다 나는 로그 성상을 많이 볼 때 :Android + AdMob 문제

:

02-01 21:57:34.437: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.512: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.512: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.587: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.587: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.657: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.657: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.727: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.727: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.797: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.802: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.872: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:34.887: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:35.002: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:35.092: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:35.092: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:35.172: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:35.172: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:35.267: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:35.267: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 
02-01 21:57:35.527: WARN/AdMobSDK(29740): Ignoring requestFreshAd() because we are requesting an ad right now already. 

많은 많은 많은 시간

다음

을이 하나의 레이아웃 수있다

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
       xmlns:sac="http://schemas.android.com/apk/res/com.myapp" 
       android:orientation="vertical" android:layout_width="fill_parent" 
       android:layout_height="fill_parent"> 

    <com.google.android.maps.MapView 
      android:id="@+id/mapview" android:layout_width="fill_parent" 
      android:layout_height="fill_parent" android:clickable="true" 
      android:apiKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" /> 

    <Button android:layout_width="wrap_content" android:id="@+id/bFlashLight" 
      android:lines="1" android:ellipsize="end" android:textSize="18sp" 
      android:layout_height="wrap_content" android:padding="10dp" 
      android:textColor="#000" android:drawablePadding="10dp" 
      android:gravity="center" android:layout_alignBottom="@id/mapview" 
      android:text="@string/open_flashlight" /> 

    <ZoomControls android:id="@+id/zoomcontrols" 
        android:layout_width="wrap_content" android:layout_height="wrap_content" 
        android:layout_toRightOf="@id/bFlashLight" android:layout_alignBottom="@id/mapview" /> 

    <com.admob.android.ads.AdView android:id="@+id/ad" 
            android:layout_width="fill_parent" android:layout_height="wrap_content" 
            sac:backgroundColor="#000000" sac:primaryTextColor="#FFFFFF" 
            sac:secondaryTextColor="#CCCCCC" android:layout_alignParentTop="true" /> 
</RelativeLayout> 

requestFreshAd() 메소드의 자동 호출을 비활성화하는 방법이 있습니까?

+0

가 수동으로 코드에 광고를 호출 라이브러리의 업데이트로 resovied했다 아니면 xml만을 사용하고 있습니까? 또한, 외부 레이아웃은 어떻게 생겼으며, 모두 선형 레이아웃의 파티입니까? – sgarman

+0

직접 코드가 추가를 요구하지 않으며 XML 만 호출합니다. 루트 컨테이너는 RelativeLayout입니다. – endryha

답변

3

단지 별도의 선형 레이아웃이 코드를 추가하고 몹 사이트에서 시간에 대한 언급을 새로 고치거나 UR 코드가 작동

<LinearLayout 
     xmlns:myapp="http://schemas.android.com/apk/res/com.myapp" 
     android:orientation="vertical" 
     android:layout_width="fill_parent" 
     android:gravity="center_horizontal" 
     android:layout_height="wrap_content"> 
    <com.admob.android.ads.AdView 
     android:id="@+id/ad" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
      android:layout_gravity="center_horizontal"> 
     </com.admob.android.ads.AdView> 
</LinearLayout>