简体   繁体   English

Admob广告无法加载

[英]Admob Ads impossible to load

I am very desesperated !! 我非常绝望! I am trying to implement Admob Ads in my application... but it's an epic fail... i am wasting more time on implementing Admob than coding my application... i really need your help please. 我正在尝试在我的应用程序中实施Admob Ads ...但这是一个史诗般的失败...我在实施Admob上所花的时间比对我的应用程序进行编码所花的时间...我真的需要您的帮助。

i give you all the informations : 我给你所有的信息:

My AndroidManifest.xml 我的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>

And now my Main.XML 现在我的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>

i don't know what to do... 我不知道该怎么办...

I am using Admob SDK 4.3.1 and my project properties is on Android 4.0.3 !! 我正在使用Admob SDK 4.3.1,并且我的项目属性在Android 4.0.3上! My project target is set to : target=android-15. 我的项目目标设置为:target = android-15。

And one more thing... when i install my APK on my HTC EVO 3D, the application is not in FULL SCREEN, it is little on my screen, i don't know why too... 还有一件事...当我在HTC EVO 3D上安装我的APK时,该应用程序不在“全屏”中,在我的屏幕上几乎没有,我也不知道为什么...

But my first big big problem is that Ads are not showing up... 但是我的第一个大问题是广告没有显示出来...

And when i emulate my application with AVD emulator on eclipse i have this screen on LogCats debug : http://s4.noelshack.com/old/up/help-c2e97f1a28.jpg 当我在eclipse上使用AVD模拟器模拟我的应用程序时,我在LogCats调试中有此屏幕: http ://s4.noelshack.com/old/up/help-c2e97f1a28.jpg

Thank you for your help !!! 谢谢您的帮助 !!!

It appears that you cannot connect with the admob servers. 看来您无法与admob服务器连接。

You can verify this by trying to ping admob (media.admob.com according to your screenshot) from a terminal emulator in android. 您可以通过尝试从android中的终端仿真器ping admob(根据您的屏幕截图,media.admob.com)进行验证。

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

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