[英]android studio is not connecting with firebase
我正在尝试在我的 android 项目中设置 Firebase。
无法解析 Android 应用程序模块的 Gradle 配置。 解决 gradle 构建问题和/或重新同步。
一直在网上寻找修复程序,其中大部分都是在 build.gradle 文件中删除 jcenter() 。 我的 build.gradle 中没有 jcenter() 或任何其他存储库。
这是我的 build.gradle 项目:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.1.1' apply false
id 'com.android.library' version '7.1.1' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Build.gradle 模块(应用程序):
plugins {
id 'com.android.application'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.pabhelhasan.autowebpagerefresher2022"
minSdk 22
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
}
buildToolsVersion '32.0.0'
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.6.0-alpha01'
implementation 'com.getbase:floatingactionbutton:1.10.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
尝试 go 到工具选项卡和 firebase 部分,这将打开 chrome 控制台。firebase.google.com 并且你会自动将它与所有模块连接并导入。
因为gradle变了,firebase没有更新说明,所以按照你的方法是行不通的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.