gpt4 book ai didi

android - 将Admob集成到我的Android Studio项目中时遇到一个奇怪的问题

转载 作者:行者123 更新时间:2023-12-03 06:25:06 25 4
gpt4 key购买 nike

所以我正在尝试在我的android项目中实现admob。为此,我正在遵循Google的官方指南(https://developers.google.com/admob/android/quick-start#import_the_mobile_ads_sdk)
但是在将此行添加到我的build.gradle(Module app)中时出现错误,

implementation 'com.google.android.gms:play-services-ads:17.1.1'



enter image description here
问题说明:

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:customtabs:26.1.0 less... (Ctrl+F1) There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion). Issue id: GradleCompatible



我的目标SDK是API 14

我的build.gradle(Module:app)
https://justpaste.it/684d6

最佳答案

用这个代替。

    apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.bitpix.tales"
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
compile 'com.android.support:customtabs:28.0.0'
compile 'com.android.support:support-v4:28.0.0'
compile 'com.android.support:support-media-compat:28.0.0'
compile 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:design:28.0.0'
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:17.1.2'

}
apply plugin: 'com.google.gms.google-services'

关于android - 将Admob集成到我的Android Studio项目中时遇到一个奇怪的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53879188/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com