姬長信(Redy)

android – 更新PlayServer和Firebase新版本10.2.0…


我使用Android Studio开发了一个Android应用程序,今天我收到了一条消息,即有一个新版本的Google Play服务和Firebase.

From 10.0.1 to 10.2.0.

我正在使用Google Play服务分析和广告.

我已经选择了API min 9而现在我认为广告无法在API中显示

 apply plugin: 'com.android.application'

android {

    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        applicationId "com.ilyo.x1application"
        minSdkVersion 9
        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.1'
    compile 'com.google.firebase:firebase-ads:10.2.0'
    compile 'com.google.firebase:firebase-core:10.2.0'
    compile 'com.google.android.gms:play-services-ads:10.2.0'
    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

错误信息

Error:Execution failed for task ‘:app:processDebugManifest’.
Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library
[com.google.firebase:firebase-ads:10.2.0]

/Users/mac/Documents/AndroidStudioProjects/Project1/app/build/intermediates/exploded-aar/com.google.firebase/firebase-ads/10.2.0/AndroidManifest.xml
Suggestion: use
tools:overrideLibrary=”com.google.firebase.firebase_ads” to force
usage

我希望我的应用程序的所有广告都能在所有设备上显示,您推荐什么?