0

我刚刚将 android studio 升级到 3.1.3 并创建了显示 admob 横幅广告的新项目,但我收到了这个错误。

我在这个较新的版本[3.1.3]中打开了我的旧项目,我有很多错误,但我通过在线搜索解决了它们。对于这个错误,我找不到任何东西。

以下是来自 build.gradle 文件的依赖项

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.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'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'

}

谢谢你。

4

1 回答 1

0

解决了。这是 build.gradle 中的问题,我对依赖项做了一些小改动

implementation "com.google.android.gms:play-services-gcm:15.0.1"

参考这个答案

如果您遇到此类问题,请检查您的依赖项及其版本。

于 2018-07-30T06:31:04.980 回答