更新PlayServices和Firebase的新版本10.2.0时出现问题 [英] Problems updating new version 10.2.0 of PlayServices and Firebase

查看:272
本文介绍了更新PlayServices和Firebase的新版本10.2.0时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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


从10.0.1到10.2.0。


我使用的是Google Play服务分析和广告。 >

我已经选择API分钟9,现在我认为广告不能显示在API< 14,

我的build.gradle文件

  apply plugin:'com.android.application'

android {

compileSdkVersion 25
buildToolsVersion25.0.0
defaultConfig {
applicationIdcom.ilyo.x1application
minSdkVersion 9
targetSdkVersion 25
versionCode 1
versionName1.0

testInstrumentationRunnerandroid。 support.test.runner.AndroidJUnitRunner

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard- rules.pro'
}
}
}

依赖项{
编译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'c​​om.android.support:appcompat-v7:25.1.1'
compile'c​​om.google.firebase:firebase-ads:10.2.0'
compile'c​​om.google.firebase:firebase-core:10.2.0'
compile'c​​om.google.android.gms:play-services-ads:10.2.0'
testCompile' junit:junit:4.12'
}

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

错误讯息
$ b



错误:执行任务':app:processDebugManifest'失败。
清单合并失败:uses-sdk:minSdkVersion 9不能小于库
中声明的版本14 [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
建议:使用
工具:overrideLibrary =com.google.firebase.firebase_ads强制
使用



我希望所有我的广告能够显示在所有设备上,您推荐什么?

所有与Google相关的服务的10.2.0版本都需要最低的API版本14.这是Google所做的选择,所以他们不必支持低于14的API版本。



所以如果你想要支持低于14的API版本,你必须永远坚持版本10.0.1。或者,你将不得不提高你的应用程序最低的API版本为14,然后使用新的谷歌服务。

文章: https://www.xda-developers.com/google-play-服务 - 发行票据 - 可用于10-2更新 - 再见姜饼/


I develop an Android app using Android Studio and I got the message today that there is a new version of Google Play services and Firebase.

From 10.0.1 to 10.2.0.

I'm using Google play services analytics and ads that's all.

I am already choose an API min 9 and Now I think the ads can't be show in API < 14 .

My build.gradle File:

 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 Message

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

I want to all my ads of my Application can show in all devices, What do you recommend ?

解决方案

The 10.2.0 version of ALL google related services require a minimum of API version 14. This is a choice done by Google, so they don't have to support API versions below 14.

So you'll have to stick to version 10.0.1 forever if you want to support API versions below 14. Or, you will have to raise your apps minimum API version to 14, and then use the new google services.

Article: https://www.xda-developers.com/google-play-services-release-notes-are-available-for-the-10-2-update-bye-gingerbread/

这篇关于更新PlayServices和Firebase的新版本10.2.0时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆