我正在尝试使用android studio提供的工具将我的Android应用连接到Firebase,但是我遇到了很多麻烦。
我尝试将依赖项更新为最新的最新google服务,但错误仍然存在 显示的错误为无法解析Android应用程序模块的Gradle配置。解决gradle构建问题和/或重新同步。
Gradle / build
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
mavenCentral()
google() // here
}
}
ext {
compileSdkVersion = 22
minSdkVersion = 9
targetSdkVersion = 23
}
成绩/应用 一个
[pply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
applicationId "com.parse.starter"
minSdkVersion 21
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:23.4.0'
implementation 'com.android.support:support-v4:23.2.0'
implementation 'com.android.support:design:23.2.0'
implementation 'com.parse.bolts:bolts-tasks:1.3.0'
implementation 'com.parse:parse-android:1.13.0'
implementation 'com.android.support:cardview-v7:23.4.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:23.4.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.firebase:firebase-database:16.1.0'
}
apply plugin: 'com.google.gms.google-services'][1]
答案 0 :(得分:0)
这是我的成绩/应用文件中所有的firebase / firestore实施。不知道其中的某些方法是否有帮助。
implementation 'com.google.firebase:firebase-firestore:17.1.2'
implementation 'com.google.firebase:firebase-core:16.0.7'
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:4.3.1'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:4.3.1'
// FirebaseUI for Firebase Auth
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
// FirebaseUI for Firebase Auth (GitHub provider)
implementation 'com.firebaseui:firebase-ui-auth-github:4.3.1'