[英]'Implementation 'com.android.support: appcompat-v7:27.1.1' issue
[英]Why i am getting error on this code implementation 'com.android.support:appcompat-v7:27.1.1'
所有com.android.support庫都必須使用完全相同的版本規范(混合版本可能導致運行時崩潰)。 找到版本27.1.1、26.1.0。
使用此依賴項時,在放置橫幅廣告時出現此錯誤
implementation 'com.google.android.gms:play-services-ads:15.0.1'
請查看我提供的圖片和代碼,請幫助我。 我目前正在使用3.1.2 android studio版本。
這些是所有代碼。 應用插件:“ com.android.application”
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.rbtcomedy.maharashtraresult"
minSdkVersion 15
targetSdkVersion 27
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:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
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'
}
圖片鏈接-https : //drive.google.com/open ? id = 19WhSgZ2aTz_kZsFYeEVtejvAGBnPHJ0S
使用此依賴項implementation 'com.google.android.gms:play-services-ads:15.0.1'
定義的庫包含版本26.1.0的庫,並且您定義了27.1.1。 因此,存在兩個具有不同版本的相同庫,您可以通過排除舊庫來解決此問題: exclude group: 'com.android.support'
espresso-Core的Exlcude支持庫如下:
androidTestImplementation('com.android.support.test.espresso:espresso-
core:3.0.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.