簡體   English   中英

無法確定任務 ':app:compileDebugJavaWithJavac' Flutter 的依賴關系

[英]Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' Flutter

當我啟動我的 flutter 應用程序時,我收到此錯誤:

   Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
    > In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[19.0.
      2]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

我在構建 gradle 中的依賴項:

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.android.gms:play-services-basement:17.4.0'
    
    implementation 'com.google.firebase:firebase-analytics:18.0.0'
    implementation 'com.google.firebase:firebase-crashlytics:17.3.0'
    implementation 'com.google.firebase:firebase-perf:19.0.10'
    implementation 'com.google.firebase:firebase-database'
    }
    
    
    apply plugin: 'com.google.gms.google-services'

請幫助我)提前謝謝

為了防止 Firebase SDK 之間的版本沖突,我建議使用Firebase 物料清單 (BoM)來管理版本。

使用 BoM,您將擁有 Firebase 的以下依賴項:

dependencies {
  implementation platform('com.google.firebase:firebase-bom:26.2.0')

  implementation 'com.google.firebase:firebase-analytics'
  implementation 'com.google.firebase:firebase-crashlytics'
  implementation 'com.google.firebase:firebase-perf'
  implementation 'com.google.firebase:firebase-database'
}

如您所見,我們指定的唯一版本是物料清單本身,這反過來又指定了特定產品 SDK 的(兼容)版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM