下面是我的构建梯度依赖关系,它起作用。
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'
我看了另一个类似问题的答案,要求使所有谷歌依赖版本兼容。 但不知道哪个版本兼容什么? 有什么办法知道这个吗?
您可以从Play-Services-Ads
中排除Support
依赖项
implementation('com.google.android.gms:play-services-ads:19.3.0') {
exclude group: 'com.android.support'
}