im currently working on login/register activity in android studio (Koala Feature Drop 2024.1.2 Patch 1) with the use of firebase. i connected my app to firebase, but when it came to “add the firebase authentication sdk to your app” Android Studio gave me this:
build.gradle (project-level)
Add rules to include the Google Services Gradle plugin:
classpath 'com.google.gms:google-services:4.4.2'
this is my build.gradle file (project level)
(i thought id("com.google.gms.google-services") version "4.4.2" apply false
is the thing i need to add, i added it but nothing is working….)
buildscript {
dependencies {
classpath(libs.google.services)
}
}
plugins {
id("com.google.gms.google-services") version "4.4.2" apply false
alias(libs.plugins.androidApplication) apply false
}
and this is build.gradle file (app level)
plugins {
alias(libs.plugins.androidApplication)
id("com.google.gms.google-services") version "4.4.2" apply false
}
android {
namespace = "com.example.projectb"
compileSdk = 34
defaultConfig {
applicationId = "com.example.projectb"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
dependencies {
implementation(platform("com.google.firebase:firebase-bom:33.3.0"))
implementation("com.google.firebase:firebase-auth:23.0.0")
implementation(libs.appcompat)
implementation(libs.material)
implementation(libs.activity)
implementation(libs.constraintlayout)
implementation(libs.firebase.auth)
testImplementation(libs.junit)
androidTestImplementation(libs.ext.junit)
androidTestImplementation(libs.espresso.core)
}
i read here someone got the problem solved by simply creating new project and doing everything again with firebase, i tried it too, but doesnt work for me unfortunately… and i followed firebase instructions about json file, it is in app folder:(((((
sorry im really new to android app coding i need this project for my university (but my field is cyber security so… i know little about android developing) please if you can help me!!!??? this is a matter of life and death
none9on is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.