Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error

34 Views Asked by At

How I can fix this, all that occurs when I installed the firebase package

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cloud_firestore:generateDebugRFile'.
> Could not resolve all files for configuration ':cloud_firestore:debugCompileClasspath'.
   > Failed to transform firebase-auth-interop-19.0.2.aar (com.google.firebase:firebase-auth-interop:19.0.2) to match attributes {artifactType=android-symbol-with-package-name, org.gradle.status=release}.
      > Could not download firebase-auth-interop-19.0.2.aar (com.google.firebase:firebase-auth-interop:19.0.2)
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-auth-interop/19.0.2/firebase-auth-interop-19.0.2.aar'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-auth-interop/19.0.2/firebase-auth-interop-19.0.2.aar'.
               > No such host is known (dl.google.com)

I tried to upgrade the dependencies

flutter pub upgrade

also I tried to change compilerSdkVersion to 33 but it doesn't work

some info in app/build.gradle

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 33
    ndkVersion flutter.ndkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

        minSdkVersion 19
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }
}


dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

and the dependencies in android/build.gradle

    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.2'
        // classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // classpath 'com.google.gms:google-services:4.3.8'

        // classpath 'com.android.tools.build:gradle:3.5.0'
        classpath 'com.google.gms:google-services:4.3.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.41"
    }
}


That is it if you have any solution please

0

There are 0 best solutions below