android - android studio中的gradle文件中的版本错误
问题描述
这是我的 gradle 文件。每当我尝试编译甚至进行干净构建时,都会遇到错误说明:
“请通过更新 google-services 插件的版本来解决版本冲突(有关最新版本的信息,请访问https://bintray.com/android/android-tools/com.google.gms.google-services/ ) 或将 com.google.android.gms 的版本更新为 16.0.3。"
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "studio.in.prakharshuka.atlastodo"
minSdkVersion 22
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'
}
}
}
//com.google.android.gms to 11.6.0.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-database:16.0.2'
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'
请告诉我我做错了什么。我有连接到我的应用程序的 firebase 身份验证和数据库。
解决方案
这不应该导致错误,应该只是一个警告。但尽管如此,试试这个:
1) 将两个 firebase 依赖项保持在 16.0.2 版本。
2)添加implementation 'com.google.firebase:firebase-core:16.0.2'
依赖。
推荐阅读
- java - 我在输出 JsonFile 中的键以相反的顺序显示
- android - 在Android中设置View的高度
- python-3.x - 如何摆脱在 Python Selenium 中使用 ChromeDriver 启动 Google Chrome 的响应消息
- amazon-web-services - aws cli - 如何仅查询 ec2 on demand 实例
- c++ - C++处理超级基本错误我应该怎么做?
- reactjs - 当tiltReverse 设置为{false} 时,react-parallax-tilt 包会干扰对子项的悬停效果
- reactjs - 如何将 MUI 手风琴的标题颜色更改为灰色?
- assembly - 设置 VMIN 和 VTIME Termios 程序集
- django - 提交表单后重定向到创建的对象
- autodesk-forge - 当用户运行 Forge 应用程序时收到通知