0

I'm using flutter version 1.22.6 to run my flutter app .. and have some packages including

  cloud_firestore: 0.16.0+1

everything runs fine and flutter pub get completed successfully, but when I try to run the app I get this error :

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':firebase_auth:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 49s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin cloud_firestore...
Running Gradle task 'assembleAarRelease'...
Exception: The plugin cloud_firestore could not be built due to the issue above.

Ahmed Wagdi
  • 3,913
  • 10
  • 50
  • 116

1 Answers1

1

Found this question in StackOverflow having a similar issue which can help in resolving the issue you’re facing.

Found another stackoverflow thread in which it is suggested to look into the following github issue and update the below line in the [Project Directory]/android/build.gradle as:

classpath 'com.android.tools.build:gradle:3.5.4'

And after that it’s suggested to run the below commands in your project directory:

flutter clean && flutter pub get

Then as a final step build the project again.