久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

在項(xiàng)目“應(yīng)用程序"中,已解決的 Google Play 服

In project #39;app#39; a resolved Google Play services library dependency depends on another at an exact version(在項(xiàng)目“應(yīng)用程序中,已解決的 Google Play 服務(wù)庫依賴項(xiàng)依賴于另一個(gè)確切版本) - IT屋-程序員軟件開
本文介紹了在項(xiàng)目“應(yīng)用程序"中,已解決的 Google Play 服務(wù)庫依賴項(xiàng)依賴于另一個(gè)確切版本的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

嘗試使用 FireStore 和 Google 身份驗(yàn)證創(chuàng)建一個(gè)簡單的應(yīng)用程序.gradle 有問題:

Trying to create a simple app with FireStore and Google Authentication. Having problem with the gradle:

在項(xiàng)目app"中,解決了 Google Play 服務(wù)庫依賴項(xiàng)取決于另一個(gè)確切版本(例如[15.0.1]",但不是正在解決該版本.圖書館展示的行為將不為人知.

In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0. 1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

依賴失敗:com.google.android.gms:play-services-flags:15.0.1-> com.google.android.gms:play-services-basement@[15.0.1],但 play-services-basement 版本是 16.0.1.

Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement@[ 15.0.1], but play-services-basement version was 16.0.1.

以下依賴項(xiàng)是直接或直接的項(xiàng)目依賴項(xiàng)具有傳遞依賴關(guān)系,導(dǎo)致藝術(shù) ifact 與問題.-- 項(xiàng)目 'app' 依賴于 com.google.firebase:firebase-firestore@17.1.5-- 項(xiàng)目 'app' 依賴于 com.firebaseui:firebase-ui-auth@4.2.0

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends onto com.google.firebase:firebase-firestore@17.1.5 -- Project 'app' depends onto com.firebaseui:firebase-ui-auth@4.2.0

對于擴(kuò)展調(diào)試信息,從命令行執(zhí)行 Gradle./gradlew --info :app:assembleDebug 查看依賴路徑神器.此錯(cuò)誤消息來自 google-services Gradle插件,在 https://報(bào)告問題github.com/google/play-services-plugins 并通過添加禁用googleServices { disableVersionCheck = false }"到您的 b uild.gradle文件.

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file.

    apply plugin: 'com.android.application'

    android {
        compileSdkVersion 27
        defaultConfig {
            applicationId "myapp.com"
            minSdkVersion 19
            targetSdkVersion 27
            versionCode 11
            versionName "1.1"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            multiDexEnabled true
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.2'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
        implementation 'com.google.firebase:firebase-firestore:17.1.5'

        implementation 'com.firebaseui:firebase-ui-auth:4.2.0'

    }

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

項(xiàng)目等級:

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'

        classpath 'com.google.gms:google-services:4.2.0'

    }
}

有人可以幫幫我嗎?

推薦答案

這里有很多解決方案的答案,這些解決方案并沒有真正解決問題.以下是解決此問題的一般方法:

There are many answers here for individual solutions that do not really get down to the problem. Here is how to solve this in general:

正如原始日志輸出所示,使用以下命令在終端中運(yùn)行構(gòu)建很有用:

As the original log output suggests, it is useful to run the build in the terminal with the following command:

./gradlew --info assembleDebug

這將為您提供沖突中涉及的所有依賴項(xiàng)的列表.它看起來與此類似(我刪除了包名稱以使其更具可讀性):

This will give you a list of all dependencies that are involved in the conflict. It looks similar to this (I removed the package name stuff to make it a bit more readable):

Dependency Resolution Help: Displaying all currently known paths to any version of the dependency: Artifact(groupId=com.google.firebase, artifactId=firebase-iid)

-- task/module dep -> firebase-analytics@17.2.0
---- firebase-analytics:17.2.0 library depends -> play-services-measurement-api@17.2.0
------ play-services-measurement-api:17.2.0 library depends -> firebase-iid@19.0.0

-- task/module dep -> firebase-core@17.2.0
---- firebase-core:17.2.0 library depends -> firebase-analytics@17.2.0
------ firebase-analytics:17.2.0 library depends -> play-services-measurement-api@17.2.0
-------- play-services-measurement-api:17.2.0 library depends -> firebase-iid@19.0.0

-- task/module dep -> play-services-measurement-api@17.2.0
---- play-services-measurement-api:17.2.0 library depends -> firebase-iid@19.0.0

-- task/module dep -> firebase-iid@19.0.0

-- task/module dep -> firebase-messaging@17.1.0
---- firebase-messaging:17.1.0 library depends -> firebase-iid@[16.2.0]

-- task/module dep -> com.pressenger:sdk@4.8.0
---- com.pressenger:sdk:4.8.0 library depends -> firebase-messaging@17.1.0
------ firebase-messaging:17.1.0 library depends -> firebase-iid@[16.2.0]

從這個(gè)列表中你會知道兩件事:

From this list you get to know 2 things:

  1. 在哪里發(fā)現(xiàn)了相互沖突的依賴關(guān)系
  2. 設(shè)置了哪些版本的沖突依賴項(xiàng)

在我的情況下,沖突的依賴是 firebase-iid:它是 @19.0.0@16.2.0

In my case the conflicting dependency is firebase-iid: It's either @19.0.0 or @16.2.0

要解決此問題,您必須在 build.gralde 中明確定義錯(cuò)誤 firebase-iid 的頂級依賴項(xiàng).

To fix this you must define the top-level dependency of the wrong firebase-iid explicitly in your build.gralde.

所以在上面的日志中,您可以看到有 2 個(gè)過時(shí)版本的 firebase-iid@16.2.0 示例.一個(gè)來自 --task/module dep ->firebase-messaging@17.1.0 來自第三方庫(pressenger)的另一個(gè).我們對第三方庫沒有影響,所以這里無所謂.但是對于其他依賴項(xiàng),我們必須使用正確的版本顯式聲明它:

So in the upper log you can see that there are 2 examples of an out-dated version of firebase-iid@16.2.0. One comes from -- task/module dep -> firebase-messaging@17.1.0 the other one from a third-party library (pressenger). We don't have influence on the third-party library, so nothing to do here. But for the other dependency, we have to declare it explicitly with the correct version:

實(shí)現(xiàn) 'com.google.firebase:firebase-messaging:20.0.0'

現(xiàn)在構(gòu)建再次運(yùn)行.快樂的結(jié)局:)

Now the build works again. Happy ending :)

這篇關(guān)于在項(xiàng)目“應(yīng)用程序"中,已解決的 Google Play 服務(wù)庫依賴項(xiàng)依賴于另一個(gè)確切版本的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現(xiàn) IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當(dāng)前風(fēng)味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復(fù)“意外元素lt;查詢gt;在“清單中找到錯(cuò)誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風(fēng)味庫的多風(fēng)味應(yīng)用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運(yùn)行時(shí)有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 亚洲午夜视频 | 国产第一页在线观看 | 精品三区 | 暖暖成人免费视频 | 国产精品日韩欧美一区二区三区 | 一区二区三区在线 | 日韩精品久久一区二区三区 | 东方伊人免费在线观看 | 成人日韩 | 亚洲美女一区 | 综合第一页 | 视频一区二区在线观看 | 欧美精品网站 | 日韩欧美精品一区 | 国产精品一区二区三区四区五区 | 亚洲a视频 | 亚洲黄色视屏 | 国产精品久久在线 | 午夜久久久久久久久久一区二区 | 国产精品毛片一区二区在线看 | 免费视频一区二区 | 国产精品色 | 欧美一级黄 | 97精品超碰一区二区三区 | 中文字幕视频在线 | 九九天堂网 | 国产91精品久久久久久久网曝门 | 欧美综合在线视频 | 午夜午夜精品一区二区三区文 | 欧美一级在线 | 超碰97免费在线 | 日韩中文字幕视频在线 | 日本高清aⅴ毛片免费 | 日韩国产欧美在线观看 | 日韩1区 | 成人在线黄色 | 亚洲欧美日韩成人在线 | 亚洲精品中文字幕中文字幕 | 黄色片在线免费看 | 蜜臀网站 | 人人人人人爽 |