在Android应用中添加Admob广告时,在依存关系中出现错误

时间:2018-07-31 13:28:18

标签: android dependencies admob

我正在尝试将admob广告集成到我的应用中,但是在我的一个依赖代码下却出现了一些红线。

 dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    **implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'**
    implementation 'com.google.android.gms:play-services-ads:15.0.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-ads:15.0.0'

我在

下显示红线
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'

我要去哪里错了?

1 个答案:

答案 0 :(得分:0)

  

尝试将appcombat版本降级为:

 implementation 'com.android.support:appcompat-v7:27.1.1'

See more here.