0

this error doesn't occur when project is already running state. but next day i tried to run the same project then this error apears.

FAILURE: Build failed with an exception.

  • Where: Build file 'D:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_auth-3.2.0\android\build.gradle' line: 58

  • What went wrong: A problem occurred evaluating project ':firebase_auth'.

Could not load compiled classes for script 'D:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_auth-3.2.0\android\user-agent.gradle' from cache.

  • 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 17s

Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)

this are my pubspec.yml dependencies

version: 1.0.0+1

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  firebase_core: "^1.10.0"
  firebase_auth: ^3.2.0

1 Answers1

0

This looks like an android configuration problem.

The solution is to add the dependencies to your android project.

The first step is to follow the instructions on Firebase Auth's pub.dev page

You can do this by adding the following lines to your android/build.gradle file:

dependencies {
    // Example existing classpath
    classpath 'com.android.tools.build:gradle:3.2.1'
   // Add the google services classpath
   classpath 'com.google.gms:google-services:4.3.0'
 }

and adding the following line to the bottom of your android/app/build.gradle file

  apply plugin: 'com.google.gms.google-services'

The next thing to do is add the Firebase Auth plugin to your android implementations

To do this you should follow the instructions => https://firebase.google.com/docs/android/setup#available-libraries

Cheers ! :-)

Awais Rehman
  • 574
  • 3
  • 10