Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Android – AdMob:缺少必需的XML属性adUnitID大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我是新的广告内容,我不能让它工作.
我在 http://code.google.com/intl/nl-NL/mobile/ads/docs/android/banner_xml.html做了什么.

这是我的main.xml:

<TableLayout
    xmlns:android="http://scheR_368_11845@as.android.com/apk/res/android"
    xmlns:ads="com.niek.runningapp"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:BACkground="#FFFFFF"
    android:stretchcolumns="1">
<!-- more stuff-->
    <TableRow
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <com.google.ads.AdView
            android:id="@+id/adView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            ads:adUnitId="a14da18492dd1f0"
            ads:adSize="BAnnER" />
    </TableRow>
<!-- More stuff -->

这是我的resrs.xml在res / values:

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <declare-styleable name="com.google.ads.AdView">
      <attr name="adSize">
          <enum name="BAnnER" value="1"/>
          <enum name="IAB_MRECT" value="2"/>
          <enum name="IAB_BAnnER" value="3"/>
          <enum name="IAB_LEADERBOARD" value="4"/>
      </attr>
      <attr name="adUnitId" format="String"/>
  </declare-styleable>
</resources>

运行应用程序时出现以下错误

我究竟做错了什么?

解决方法

任何仍然努力的人都可以尝试xmlns:ads =“http://scheR_368_11845@as.android.com/apk/lib/com.google.ads”.

大佬总结

以上是大佬教程为你收集整理的Android – AdMob:缺少必需的XML属性adUnitID全部内容,希望文章能够帮你解决Android – AdMob:缺少必需的XML属性adUnitID所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。