android - 在 Android Studio 上实现 firebase 的错误消息
问题描述
所以我试图在 Android Studio 上实现 Firebase,并且这个错误消息不断弹出
“请通过更新 google-services 插件的版本来解决版本冲突(有关最新版本的信息,请访问https://bintray.com/android/android-tools/com.google.gms.google-services/ ) 或将 com.google.android.gms 的版本更新为 16.0.1。”
我知道它说要更新它。但是我该怎么做呢?
这是我的项目的 build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.jbdelosreyes.finalmvp"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-firestore:17.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
这是我的模块的 build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.jbdelosreyes.finalmvp"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-firestore:17.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
解决方案
转到 Android SDK 并更新 - Google Play 服务 - Google 存储库
推荐阅读
- angular - 单元测试 Observable 订阅中抛出的错误
- javascript - 当组织 npm 中有多个可用版本时会发生什么
- javascript - 如何使用 Python 和 Beautiful-soup 从 Instagram 抓取标签
- python - Python group by 并找到匹配条件的第一个序列
- c++ - `static` 的使用如何影响我的代码速度?
- git - 为什么当我输入命令“git reflog”时 Git Bash 什么也不显示
- laravel - Laravel Sanctum 用于制作 Api
- powershell - 在 Powershell 中使用自定义文件列表(文件路径和大小)填充 ListView
- python - R的Keras:AttributeError:'Tensor'对象没有属性'_numpy'
- javascript - 如何将firebase中的数据保存在变量上