Gradle 在 Android Studio 中连接到 Firebase 的当前版本是什么?

What is the Current Version of Gradle To Connect to Firebase in Android Studio?

我正在考虑在 android 工作室创建一个应用程序,目前,我正在创建它的登录部分。我正在观看有关如何执行此操作的教程,我遵循了所有说明,但它在 build.gradle(模块:应用程序)文件中给出了关于连接到 Firebase 以通过电子邮件和密码对用户进行身份验证的错误。我认为该错误与以下代码行中的版本号有关: 应用插件:'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'

}

尝试使用电子邮件和密码连接到 Firebase 身份验证时出现的错误是: 无法解析 Android 应用程序模块的 Gradle 配置。解决 gradle 构建问题 and/or 重新同步。

这两行的最新版本是什么: 实施 'android.support:appcompat-v7:28.0.0' 实施 'androidx.appcompat:design:1.1.0' 语法是否正确? 提前致谢!

这里是 link 连接 android 项目与 firebase 只需按照 link

中的指导步骤

确保您在 firebase 控制台中添加了 sha1 您可以通过以下 link 步骤获得 sh1

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

实施'android.support:appcompat-v7:28.0.0' 改用这个 实施 'androidx.legacy:legacy-support-v4:1.0.0'

使用这个等级

    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'