简体   繁体   中英

How to solve " A problem occurred configuring project ':firebase_auth'. "

I'm working with firebase in flutter and on running my app i get the following logs

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':firebase_auth'.
> Could not resolve all artifacts for configuration 
':firebase_auth:classpath'.
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib- 
jdk8:1.3.50.
 Required by:
     project :firebase_auth > 
com.android.tools.build:gradle:3.5.4
     project :firebase_auth > 
com.android.tools.build:gradle:3.5.4 > 
com.android.tools.build:builder:3.5.4
     project :firebase_auth > 
com.android.tools.build:gradle:3.5.4 > 
 com.android.tools.lint:lint-gradle-api:26.5.4
     project :firebase_auth > 
com.android.tools.build:gradle:3.5.4 > 
com.android.tools.build:gradle-api:3.5.4
     project :firebase_auth > 
com.android.tools.build:gradle:3.5.4 > 
androidx.databinding:databinding-compiler-common:3.5.4

pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.2
  firebase_auth: ^3.0.1
  firebase_core: ^1.4.0

Can someone help please

i do this for stable work: in android/gradle/wrapper/gradle-wrapper.properties change line to ->

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip

in android/app/build.gradle

    defaultConfig { 
        minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger()
        targetSdkVersion localProperties.getProperty('flutter.targetSdkVersion').toInteger()

in android/build.gradle

    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.2'

add This in android/local.properties

flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=1
flutter.minSdkVersion=21
flutter.targetSdkVersion=30
flutter.compileSdkVersion=30

open the Android folder separate with ur IDE, then he will download the new Gradle version automatically

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