簡體   English   中英

混合版本可能導致運行時崩潰

[英]Mixing version can lead to run time crashes

清單文件的第二個實現行中似乎存在一些問題,即(實現'com.android.support:cardview-v7:26.1.0')。 我正在創建一個基於地圖的應用程序,整個項目中沒有錯誤。 但是此行顯示錯誤信息

“所有com.android.supprt庫必須使用完全相同的版本規范(混合版本可能導致運行時運行時崩潰。找到版本26.1.0,25.2.0。示例包括com.android.supprt:animated-vector-drawable :26.1.0和com.android.supprt:mediarouter-v7:25.2.0更多...(Ctrl + F1)“

重建應用程序時,此錯誤顯示在下面的欄中

Error:Execution failed for task 
':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: 
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dexex"

這是我的清單文件,請簽出。 錯誤在第15行中。

//noinspection GradleCompatible
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
    applicationId "com.matt.autoza"
    minSdkVersion 22
    targetSdkVersion 26
    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:cardview-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.android.gms:play-services-maps:11.6.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

compile 'com.github.d-max:spots-dialog:0.7@aar'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.github.glomadrian:MaterialAnimatedSwitch:1.1@aar'
compile 'uk.co.chrisjenx:calligraphy:2.3.0'
compile 'com.google.firebase:firebase-core:11.6.0'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.firebase:geofire-android:2.1.2'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.google.firebase:firebase-database:11.6.0'
compile 'com.google.firebase:firebase-auth:11.6.0'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
compile 'com.google.android.gms:play-services:11.6.0'

}
apply plugin: 'com.google.gms.google-services'
compile 'com.github.d-max:spots-dialog:0.7@aar'
compile 'com.github.glomadrian:MaterialAnimatedSwitch:1.1@aar'

compile 'uk.co.chrisjenx:calligraphy:2.3.0'

compile 'com.rengwuxian.materialedittext:library:2.1.4'

compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'

compile 'com.google.firebase:firebase-core:11.6.0'
compile 'com.firebase:geofire-android:2.1.2'
compile 'com.google.firebase:firebase-database:11.6.0'
compile 'com.google.firebase:firebase-auth:11.6.0'

compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
compile 'com.google.android.gms:play-services:11.6.0'


//removed
//compile 'com.google.android.gms:play-services:11.6.0' as there was no need for it
compile 'com.google.android.gms:play-services-location:12.0.1' 
compile 'com.google.android.gms:play-services-maps:12.0.1'


//Updated the firebase versions accurately
compile 'com.firebase:geofire-android:2.1.2'
compile 'com.google.firebase:firebase-core:12.0.1'
compile 'com.google.firebase:firebase-auth:12.0.1'
compile 'com.google.firebase:firebase-database:12.0.1'

//removed appCompat as that is no further required  in androidStudio
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'

compile 'com.github.glomadrian:MaterialAnimatedSwitch:1.1@aar'
compile 'com.github.d-max:spots-dialog:0.7@aar'

compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'uk.co.chrisjenx:calligraphy:2.3.0'

try pasting these at the uppers place. This would solve the problem for sure

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM