apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.shery.youtubevideodownloader"
minSdkVersion 15
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'
}
}
buildToolsVersion = '28.0.3'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:17.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'
}
我想在我的应用程序上添加admob广告,我已经添加了可以在上面检查的依赖项,并且在gradle上添加了maven,但是为什么会出现此错误
allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}
}
但是我的错误出现在下面的这一行 实施'com.android.support:appcompat-v7:28.0.0-alpha1'
错误是
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0-alpha1, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0-alpha1 and com.android.support:customtabs:26.1.0 less... (Ctrl+F1)
为什么我不知道这个错误
答案 0 :(得分:0)
customtabs库使用的支持库版本为26.1.0,小于28.0.0-alpa1。
所有库都应使用相同版本的支持库,无论是28.0.0-alpha1还是26.1.0。可以更改
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
到implementation 'com.android.support:appcompat-v7:26.1.0