3

My Flutter project stopped working once I updated my dependencies. I am getting the following error:

  • What went wrong: Could not determine the dependencies of task ':firebase_core:compileDebugAidl'.

    Could not resolve all task dependencies for configuration ':firebase_core:debugCompileClasspath'. Could not find com.google.firebase:firebase-core:. Required by: project :firebase_core

Below is my app\build.gradle

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    implementation 'com.google.firebase:firebase-core:16.0.8'
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
}

Please see the below screenshot of error enter image description here

Sam
  • 2,972
  • 6
  • 34
  • 62
  • take a look at this: https://stackoverflow.com/a/54857699/796963 – Feu Apr 07 '19 at 12:33
  • I am struggling with the same issue, link mentioned by @Feu did not work for me. A bug has been opened https://github.com/flutter/flutter/issues/30631 – Brad Apr 07 '19 at 19:08

3 Answers3

4

This issue was fixed in the 0.3.4 update of firebase_core, which is a dependency of Flutter Firebase plugins. "flutter packages upgrade" may fix it for you.

https://github.com/flutter/plugins/pull/1464/files

Collin Jackson
  • 110,240
  • 31
  • 221
  • 152
2

First, try this command:

flutter pub cache repair

if not works then run this:

flutter clean
Payam Khaninejad
  • 7,692
  • 6
  • 45
  • 55
0

It looks like the file(from flutter project) Flutter plugins/firebase_core-0.3.2/android/src/main/build.gradle was possibly missing the version for firebase, replace

 api 'com.google.firebase:firebase-core'

with:

 api 'com.google.firebase:firebase-core:16.0.8'

and it builds for me. I found it does not require the need for:

implemention 'com.google.firebase:firebase-core:16.0.8'

in flutter project android/app/build.gradle file.

Brad
  • 122
  • 1
  • 5