android - 无法解决:将 google-services 更新到 15.0.0 后 play-services-basement
问题描述
我已将我的应用程序更新为,compileSdkVersion 27
我也将所有库更新为gradle plugin
3.0.1'
play-services
version 15.0.0
现在,当我构建应用程序时,它给了我以下错误消息。
无法解决:play-services-basement
我正在使用force 'com.google.android.gms:play-services-basement:15.0.0'
,我无法理解为什么它给我这个错误信息。
这些是我的 gradle 设置。
compileSdkVersion 27
buildToolsVersion "27.0.1"
defaultConfig {
applicationId ''
minSdkVersion 21
targetSdkVersion 27
versionCode 285
multiDexEnabled true
resConfigs "en"
}
resolutionStrategy {
force 'com.squareup.okhttp:okhttp:2.4.0'
force 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
force 'com.android.support:support-v4:24.1.1'
force 'com.android.support:cardview-v7:24.1.1'
force 'com.android.support:appcompat-v7:24.1.1'
force 'com.android.support:design:24.1.1'
force 'com.google.android.gms:play-services-ads:15.0.0'
force 'com.google.android.gms:play-services-location:15.0.0'
force 'com.google.android.gms:play-services-auth-base:15.0.1'
force 'com.google.android.gms:play-services-base:15.0.0'
force 'com.google.android.gms:play-services-maps:15.0.0'
force 'com.google.android.gms:play-services-identity:15.0.0'
force 'com.google.android.gms:play-services-wallet:15.0.0'
force 'com.google.android.gms:play-services-tasks:15.0.0'
force 'com.google.android.gms:play-services-basement:15.0.0'
force 'com.google.firebase:firebase-common:15.0.0'
force 'com.google.android.gms:play-services-base:15.0.0'
}
dependencies {
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.google.android.gms:play-services-maps:15.0.0'
implementation 'com.google.android.gms:play-services-analytics:15.0.0'
implementation 'com.google.android.gms:play-services-location:15.0.0'
implementation 'com.google.firebase:firebase-appindexing:15.0.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.android.gms:play-services-auth-base:15.0.0'
implementation 'com.google.android.gms:play-services-panorama:15.0.0'
implementation 'com.google.android.gms:play-services-ads:15.0.0'
implementation('com.google.firebase:firebase-messaging:15.0.0') {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
}
implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'org.jsoup:jsoup:1.8.3'
}
Gradle 包装器属性
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
构建.gradle
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.2.0'
解决方案
我在编译我的项目时遇到了同样的错误,尽管我没有直接包含对play-services-basement
. 为我解决的问题是我将所有其他依赖项更新到最新版本并重新同步 Gradle。
推荐阅读
- python-3.x - 嵌套在另一个 Combobox 中的 Combox
- ruby - Ruby IO.popen 权限被拒绝
- http - Tomcat 报告文件下载成功开始的 500 状态
- python - 升级到 Catalina 后找不到 Pandas 和 Jupyter
- database - 如何在 Neo4j 中创建两个不同列之间的关系
- java - 为什么我在 SQLite 中登录页面时页面会自动关闭?
- activeadmin - Webpacker 找不到 chartkick
- java - Java 类变量在类之间更新不一致
- html - 链接悬停上的动画图标
- c - 使用 Windows MiniFilter 驱动程序拦截进程访问