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

2

3 Answers 3

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

Sign up to request clarification or add additional context in comments.

Comments

2

First, try this command:

flutter pub cache repair

if not works then run this:

flutter clean

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.