android - 如何将所有谷歌依赖项设置为兼容版本?
问题描述
以下是我的构建 Gradle 依赖项,它有效。
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
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'
implementation files('libs/jama-1.0.2.jar')
implementation files('libs/la4j-0.4.5.jar')
//implementation group: 'org.ejml', name: 'ejml-all', version: '0.37.1'
//implementation group: 'org.openimaj', name: 'openimaj', version: '1.3.1', ext: 'pom'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.0'
//implementation 'com.google.android.gms:play-services-ads:18.3.0'
//implementation 'com.google.android.gms:play-services-ads:19.3.0'
}
但是当我尝试添加以下依赖项时:
implementation 'com.google.android.gms:play-services-ads:19.3.0
我收到以下错误。
implementation 'com.android.support:appcompat-v7:28.0.0'
我查看了另一个类似问题的答案,该问题要求使所有谷歌依赖版本兼容。但是不知道哪个版本兼容什么?有没有办法知道这一点?
解决方案
您可以support
从play-services-ads
implementation('com.google.android.gms:play-services-ads:19.3.0') {
exclude group: 'com.android.support'
}
推荐阅读
- r - R 版本 4 的个人包中的 UseMethod 错误
- python - 瓶子和多个请求
- python - 打包python资源(Manifest.in vs package_data vs data_files)
- flutter - 在小部件加载颤动时触发动画
- excel - VBA数字格式化Excel中的公式
- ansible - Ansible - 并行运行两个任务
- css - 无法将材料 ui 数据表列(表头)编辑到文本中心对齐(React)
- java - Java.lang.NoSuchFieldError:类“Ljava/lang/Integer”中没有“I”字段“值”;或其超类 Android 10
- c# - WPF:KO 无法同步 StoryBoards 动画 + 无法更改应用程序主题
- c# - 使所有方法的 Moq 输出调用到控制台