【发布时间】:2013-08-18 17:07:22
【问题描述】:
我在我的应用上添加了 admob sdk 6.4,但它未能在应用上显示
logcat 显示以下错误信息
?:??: W/?(?): com.android.internal.widget.SizeAdaptiveLayout@425f9e70child view android.widget.FrameLayout@424d1538 在 95px 被限制到 96px 时测量出界
而我的activity_mail.xml如下
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ns="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/picture"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/sexy" >
</ImageView>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#00000000"
android:stretchColumns="*" >
</TableLayout>
<TableRow
android:id="@+id/tableRow1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_margin="3sp"
android:layout_marginBottom="116dp"
android:gravity="center"
android:weightSum="2" >
<Button
android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pattern #1" />
<Button
android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pattern #2" />
<Button
android:id="@+id/btn3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OFF" />
</TableRow>
<com.google.ads.AdView
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/tableRow1"
ns:adSize="BANNER"
ns:adUnitId="a152106a3311446 "
ads:testDevices="37329DE7326D00EC" >
</com.google.ads.AdView>
</RelativeLayout>
我该如何解决?
【问题讨论】:
-
你把罐子放进去了吗?
-
我将它包含在构建路径中(外部 jars)
-
你的库文件夹是“lib”还是“libs”?