Home > database >  Cannot connect to firebase
Cannot connect to firebase

Time:10-01

I cannot connect to firebase. I had added needed imports and removed jcenter() but still don't works.

Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync.

My Gradle

   dependencies {
    implementation platform('com.google.firebase:firebase-bom:28.4.1')
    implementation 'com.google.firebase:firebase-analytics-ktx'

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.github.QuadFlask:colorpicker:0.0.15'
    testImplementation 'junit:junit:4. '
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation "com.airbnb.android:lottie:4.1.0"

}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: "androidx.navigation.safeargs"
buildscript {
    ext.kotlin_version = "1.3.72"
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.2'
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31'
   
        classpath 'com.google.gms:google-services:4.3.10'
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

CodePudding user response:

I have same issue sometime ago

    viewBinding.enabled = true

Comment this lins if you are using viewbinding in your project after connecting firebase you can unComment this lines

  • Related