Home > Net >  Could not find com.google.firebase-database:10.2.0:
Could not find com.google.firebase-database:10.2.0:

Time:06-22

Hello I am trying to connect with FireBase with my Android Project I am currently struggling with this error

"Could not find com.google.firebase-database:10.2.0:."

Here is my build.gradle(app)

plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}

android {
compileSdk 32

defaultConfig {
    applicationId "com.example.cafesample"
    minSdk 21
    targetSdk 32
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

implementation 'com.google.firebase:firebase-core:10.2.0'
implementation 'com.google.firebase-database:10.2.0'
implementation 'info.hoang8f:fbutton:1.0.5'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
}
apply plugin: 'com.google.gms.google-services'

I have seen solutions where I update my google services from SDK Tools But still have the issue when I try to run my Android Project

Here is my other Build.Gradle(AppName)

plugins {
id 'com.android.application' version '7.2.0' apply false
id 'com.android.library' version '7.2.0' apply false
id 'com.google.gms.google-services' version '4.3.0' apply false

}

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

CodePudding user response:

Perhaps, you're implementing it wrong. Change it to implementation 'com.google.firebase:firebase-database:20.0.5'

  • Related