繁体   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