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

在項目“應用程序"中,已解決的 Google Play 服

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

問題描述

嘗試使用 FireStore 和 Google 身份驗證創建一個簡單的應用程序.gradle 有問題:

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

在項目app"中,解決了 Google Play 服務庫依賴項取決于另一個確切版本(例如[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.

以下依賴項是直接或直接的項目依賴項具有傳遞依賴關系,導致藝術 ifact 與問題.-- 項目 'app' 依賴于 com.google.firebase:firebase-firestore@17.1.5-- 項目 '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

對于擴展調試信息,從命令行執行 Gradle./gradlew --info :app:assembleDebug 查看依賴路徑神器.此錯誤消息來自 google-services Gradle插件,在 https://報告問題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

項目等級:

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:

正如原始日志輸出所示,使用以下命令在終端中運行構建很有用:

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

./gradlew --info assembleDebug

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

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]

從這個列表中你會知道兩件事:

From this list you get to know 2 things:

  1. 在哪里發現了相互沖突的依賴關系
  2. 設置了哪些版本的沖突依賴項

在我的情況下,沖突的依賴是 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 中明確定義錯誤 firebase-iid 的頂級依賴項.

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

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

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:

實現 'com.google.firebase:firebase-messaging:20.0.0'

現在構建再次運行.快樂的結局:)

Now the build works again. Happy ending :)

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

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

相關文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 亚洲精品一区二区三区蜜桃久 | 日韩中文字幕在线免费 | 日本成人在线观看网站 | 精品国产乱码久久久久久a丨 | 国内自拍偷拍 | 五月婷婷激情 | 欧日韩在线 | 欧美精品在线播放 | 亚洲精品久久久久久久久久久久久 | 自拍偷拍亚洲一区 | www.天天操 | 日韩毛片在线观看 | 一区二区三区精品视频 | 国产激情片在线观看 | 国产福利资源 | 中文字幕在线观看一区二区 | 亚洲一区二区三区免费在线 | 丁香综合| 欧美1区2区 | 日日夜精品视频 | 国产最新视频在线 | 91精品久久久久久久久久 | 国精日本亚洲欧州国产中文久久 | 毛片区 | 一区在线播放 | 亚洲国产精品视频 | 很黄很污的网站 | 一区二区三区欧美 | 福利视频一区二区 | 全免费a级毛片免费看视频免 | 国产一级一级国产 | 色综合久久天天综合网 | 久久er精品| 人人做人人澡人人爽欧美 | 亚洲精品综合一区二区 | 国产三级在线观看播放 | 中文在线一区二区 | 欧美男人亚洲天堂 | 国产香蕉视频在线播放 | 国产欧美久久精品 | 免费毛片www com cn |