2012-01-22 10 views
0

admob 계정을 새로 만들었습니다. 나는 구글 내 게시자 ID와 예제를 제공 실행, 나는 에뮬레이터 로그 캣에 다음과 같은 로그를 발견 :Android AdMob 광고가 표시되지 않습니다.

I/Ads  ( 564): adRequestUrlHtml: <html><head><script src="http://media.admob.com/sdk-core-v40.js"></script><script>AFMA_buildAdURL({"preqs":1,"u_sd":1,"slotname":"**********","u_w":320,"msid":"com.hani.android.admobtest","simulator":1,"cap":"m,a","js":"afma-sdk-a-v4.3.1","isu":"B3EEABB8EE11C2BE770B684D95219ECB","cipa":0,"format":"320x50_mb","net":"ed","app_name":"1.android.com.hani.android.admobtest","hl":"en","extras":{"color_link":"0000FF","color_url":"00FF00","color_text":"000000","color_border":"000000","color_bg":"FF8855"},"u_h":480,"testing":1,"u_audio":4});</script></head><body></body></html> 
W/webcore ( 564): Can't get the viewWidth after the first layout 
I/Ads  ( 564): Received ad url: <"url": "http://googleads.g.doubleclick.net:80/mads/gma?preqs=1&u_sd=1&slotname=**********&u_w=320&msid=com.hani.android.admobtest&cap=m%2Ca&js=afma-sdk-a-v4.3.1&isu=B3EEABB8EE11C2BE770B684D95219ECB&cipa=0&format=320x50_mb&net=ed&app_name=1.android.com.hani.android.admobtest&hl=en&u_h=480&u_audio=4&u_so=p&adtest=on&output=html&region=mobile_app&u_tz=-180&ex=1&client_sdk=1&askip=1&pto=0&color_link=0000FF&color_url=00FF00&color_text=000000&color_border=000000&color_bg=FF8855&jsv=1", "afmaNotifyDt": "null"> 
D/dalvikvm( 564): GC_CONCURRENT freed 336K, 48% free 3280K/6279K, external 1651K/1996K, paused 6ms+5ms 
I/Ads  ( 564): Invalid response code: 404 
D/webviewglue( 564): nativeDestroy view: 0x303a88 
I/Ads  ( 564): onFailedToReceiveAd(There was an internal error.) 

어떠한 광고가 게재되지 않습니다. 아무도 전에 404 오류를 직면했다? 여기

내 매니페스트 XML

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:myapp="http://schemas.android.com/apk/res/com.hani.titanium.test" 
    package="com.hani.titanium.test" 
    android:versionCode="1" 
    android:versionName="1.0" > 

    <uses-sdk android:minSdkVersion="8" /> 
    <uses-permission android:name="android.permission.INTERNET"/> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 
    <application 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" > 
     <activity 
      android:name=".AdmobTestActivity" 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity android:name="com.google.ads.AdActivity" 
       android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> 
    </application> 
</manifest> 

하고 코드

패키지 com.hani.titanium.test이다;

import com.google.ads.AdRequest; 
import com.google.ads.AdSize; 
import com.google.ads.AdView; 
import android.app.Activity; 
import android.os.Bundle; 
import android.widget.LinearLayout; 

public class AdmobTestActivity extends Activity { 

    private AdView adView; 


    /** Called when the activity is first created. */ 
    @Override 
    public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.main); 

    adView = new AdView(this, AdSize.BANNER, "**********"); 
    LinearLayout layout = (LinearLayout)findViewById(R.id.linearLayout); 
    layout.addView(adView); 

    AdRequest request = new AdRequest(); 
//  request.addTestDevice(AdRequest.TEST_EMULATOR); 
    request.setTesting(true); 
    adView.loadAd(request); 
    } 

} 

나는 그들 중 누구도 을 일하지 setTesting(true)addTestDevice하지만 모두가 나 또한 내가 거기에 그것을 시도하고 나를 믿지하게 동일한 출력을 가지고 티타늄을 잘 알고있는 사람들을 위해 프로젝트 대상 = 13

이 시도 그것은 admob 서비스 그 자체와 관련이 있습니다

+0

게시자의 광고 코드를 게시하십시오.하지만 게시자 ID를 삭제하십시오. –

+0

귀하의 XML 게시물하시기 바랍니다 – Mun0n

+0

나는 게시물을 업데이 트 – hini

답변

0

코드 자체가 잘 보입니다. setTesting(true) (FYI 대신 사용되지 않음) 및 addTestDevice(AdRequest.TEST_EMULATOR은 모두 에뮬레이터에서 테스트 모드를 적절히 활성화합니다. 404 오류가 계속 표시됩니까? 기기에서 인터넷에 액세스 할 수 있습니까?

+0

나는 2 주 동안 응용 프로그램을두고 내가 다시 시도했을 때. 그래서 문제는 admob 서비스 자체에서 발생했습니다. – hini

관련 문제