简体   繁体   中英

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

When I start my flutter app, Im getting this error:

   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.

My dependencies in build 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'

Please help me) Thanks in advance

To prevent versioning conflicts between Firebase SDKs, I recommend using the Firebase Bill of Materials (BoM) to manage the versions.

With the BoM, you'd have the following dependencies for 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'
}

So as you can see, the only version we specify is for the Bill of Materials itself This in turn then specifies the (compatible) versions of the specific product SDKs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM