2012-01-31 144 views
0

我非常失望! 我正在尝试在我的应用程序中实施Admob广告......但这是一个史诗般的失败......我浪费更多时间来实施AdMob,而不是编码我的应用程序......我真的需要您的帮助。Admob广告无法加载

我给你所有的信息:

我的AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?> 
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="package.test.sound" 
    android:versionCode="1" 
    android:versionName="1.0" > 
    <uses-permission android:name="android.permission.INTERNET"/> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 
    <application 
    android:icon="@drawable/gg" 
    android:label="@string/app_name" > 
    <activity 
     android:name=".startActivity" 
     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=".test1" 
     android:label="@string/app_name" > 
     </activity> 
    <activity 
     android:name=".test2" 
     android:label="@string/app_name" > 
     </activity> 
    <activity 
     android:name=".test3" 
     android:label="@string/app_name"> 
     </activity> 
     <meta-data android:value="xxxx MY ID xxxx"  android:name="ADMOB_PUBLISHER_ID" /> 
    <activity android:name="com.google.ads.AdActivity" 
       android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"></activity> 

    <uses-sdk android:minSdkVersion="10"/> 

    </application> 

    </manifest> 

现在我的main.xml

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:background="@drawable/sc2" 
android:orientation="vertical" > 

<LinearLayout 
    android:id="@+id/linearLayout1" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:orientation="horizontal" 
    android:gravity="center" > 

<Button 
     android:id="@+id/button1" 
     android:layout_width="wrap_content" 
     android:layout_height="match_parent" 
     android:text="test1" 
     android:textColor="#005113" /> 


    <Button 
     android:id="@+id/button3" 
     android:layout_width="wrap_content" 
     android:layout_height="match_parent" 
     android:text="test2" 
     android:textColor="#970000" /> 





    <Button 
     android:id="@+id/button2" 
     android:layout_width="wrap_content" 
     android:layout_height="match_parent" 
     android:text="test3" 
     android:textColor="#001760" /> 
    </LinearLayout> 
<LinearLayout 
    android:id="@+id/linearLayout1" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" 
    android:gravity="bottom" > 

    <com.google.ads.AdView 
     android:id="@+id/adView" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_centerInParent="true" 
     ads:adSize="BANNER" 
     ads:adUnitId="xxxx MY ID xxxx" 
     ads:loadAdOnCreate="true" > 
    </com.google.ads.AdView> 
</LinearLayout> 
</LinearLayout> 

我不知道该怎么办...

我使用Admob SDK 4.3.1,我的项目属性在Android 4.0.3上! 我的项目目标设置为:target = android-15。

还有一件事......当我在我的HTC EVO 3D安装APK我的应用程序是不是在全屏幕,这是我的屏幕上一点,我不知道为什么太...

但我的第一个大的大问题是,广告不会被显示出来......

当我在模仿我的日食与AVD模拟器应用程序,我有LogCats调试屏幕:http://s4.noelshack.com/old/up/help-c2e97f1a28.jpg

谢谢您的帮助!

+0

http://stackoverflow.com/questions/9077400/admob-ads-is-not-showing-up-admob-4-3-1 – Selvin 2012-01-31 15:54:52

+0

答案不适用于我。请帮助我,而不是:) – dealswiss 2012-01-31 16:01:08

回答

1

看来您无法连接到admob服务器。

您可以通过尝试从android中的终端模拟器ping admob(media.admob.com根据您的屏幕截图)来验证这一点。

+0

谢谢。但它在真实设备上的同样的问题:( – dealswiss 2012-01-31 16:48:46

+2

我的问题已解决....我没有看到我的应用程序自己的广告,导致我的手机被根/ ROM闪烁... – dealswiss 2012-01-31 23:39:45

+0

@dealswiss你应该解决方案作为答案并使绿色勾号...所以这个解决方案将在未来更有用..感谢分享知识! – swiftBoy 2012-08-08 04:49:14