Android 必需的XML属性';adSize';不见了

Android 必需的XML属性';adSize';不见了,android,gradle,firebase,admob,Android,Gradle,Firebase,Admob,因此,出于某种原因,当我在adview中放置时,它不会自动填充ads:adSize和ads:adUnitId,我无法选择它们,并且我的广告显示的文本读取缺少必需的XML属性“adSize”。此外,我认为我无法在版面中填写xmlns:ads,尽管我可能弄错了。为什么会这样 我的格拉德斯 // Top-level build file where you can add configuration options common to all sub-projects/modules. bu

因此,出于某种原因,当我在adview中放置时,它不会自动填充ads:adSize和ads:adUnitId,我无法选择它们,并且我的广告显示的文本读取缺少必需的XML属性“adSize”。此外,我认为我无法在版面中填写xmlns:ads,尽管我可能弄错了。为什么会这样

我的格拉德斯

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'
        classpath 'com.google.gms:google-services:3.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
第二个版本,格雷德尔

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        applicationId "com.example.matig.adtest"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.1.0'
    testCompile 'junit:junit:4.12'
    compile 'com.google.firebase:firebase-ads:9.0.2'
    compile 'com.google.android.gms:play-services-ads:9.0.2'
}

apply plugin: 'com.google.gms.google-services'
我的布局:

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_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="com.example.matig.adtest.MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!" />

    <com.google.android.gms.ads.AdView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:id="@+id/adView3" />


</RelativeLayout>


我一步一步地学习firebases教程,所以我真的很困惑我做错了什么

将您的布局与您需要添加的建议进行比较:

xmlns:ads="http://schemas.android.com/apk/res-auto"


我是另一个人,有着不同的问题
ads:adSize="BANNER"