gpt4 book ai didi

android - 没有足够的空间显示广告需求 480 75

转载 作者:行者123 更新时间:2023-11-29 21:11:55 24 4
gpt4 key购买 nike

我尝试了很多事情,但没有任何帮助。我的问题是我的 admob 广告 没有显示并且 LogCat 正在写这个:

03-19 12:30:56.140: E/Ads(790): Not enough space to show ad! Wants: <480, 75>, Has: <432, 690>
03-19 12:30:56.140: E/Ads(790): Not enough space to show ad! Wants: <480, 75>, Has: <432, 357>

可能问题出在模拟器上,而不是代码上?将非常感谢任何帮助我的 manifest.xml:

        <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.gosha.whymod.MainActiviti"
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>

MainActivity.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads= "http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActiviti" >

<Button
android:id="@+id/knopka"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="142dp"
android:gravity="center"
android:onClick="onClick"
android:text="Get answer now" />

<TextView
android:id="@+id/texte"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="32dp"
android:gravity="center"
android:text="Why modern art is so strange?"
android:textAppearance="?android:attr/textAppearanceLarge" />

<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/knopka"
ads:adSize="SMART_BANNER"
ads:adUnitId="ca-app-pub-1837185169360297/2930943167"
ads:loadAdOnCreate="true"
ads:testDevices="TEST_EMULATOR" />

最佳答案

替换

<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/knopka"
ads:adSize="SMART_BANNER"
ads:adUnitId="ca-app-pub-1837185169360297/2930943167"
ads:loadAdOnCreate="true"
ads:testDevices="TEST_EMULATOR" />

<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/knopka"
ads:adSize="SMART_BANNER"
ads:adUnitId="ca-app-pub-1837185169360297/2930943167"
ads:loadAdOnCreate="true"
ads:testDevices="TEST_EMULATOR" />
</ScrollView>

关于android - 没有足够的空间显示广告需求 480 75,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22506145/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com