1

I was looking into creating an app on an android studio and currently, I am creating the login portion of it. I was watching a tutorial on how to do this and I followed all instructions but it gave me an error in the build.gradle (Module: app) file regarding connecting to Firebase to authenticate a user by email and password. I believe that the error is related to the version number in the code lines below: apply plugin: 'com.android.application'

android {
compileSdkVersion 28
buildToolsVersion "29.0.3"

defaultConfig {
    applicationId "com.example.simplysnap"
    minSdkVersion 15
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
}
dependencies {

implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:28.0.0'
//The two lines below have the errors
implementation 'android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:design:1.1.0'
// Until here
implementation 'androidx.support:support-v7:28.0.0'
implementation 'androidx.support:design:28.0.0'
implementation 'androidx.constraintlayout:constraintlayout:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:28.0.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
compile 'com.google.api-client:google-api-client:1.22.0'
compile 'com.google.http-client:google-http-client-gson:1.22.0'

}

The error I get when trying to connect to Firebase Authentication w/ email and password is this: Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync.

What is the latest version of the two lines: implementation 'android.support:appcompat-v7:28.0.0' implementation 'androidx.appcompat:design:1.1.0' And is the syntax correct? Thanks in advance!

Laura Smith
  • 133
  • 9

1 Answers1

0

Here is the link to connect android project with firebase just follow the step guided in the link

make sure you added the sha1 in firebase console you get the sh1 by following this link steps https://stackoverflow.com/a/34223470/5309463

https://firebase.google.com/docs/android/setup

implementation 'android.support:appcompat-v7:28.0.0' Use this instead implementation 'androidx.legacy:legacy-support-v4:1.0.0'

use this gradel

    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.google.api-client:google-api-client:1.22.0'
    implementation 'com.google.http-client:google-http-client-gson:1.22.0'