简体   繁体   English

混合版本可能导致运行时崩溃

[英]Mixing version can lead to run time crashes

There seems to be some problem in the Manifest file's second implementation line which is as (implementation 'com.android.support:cardview-v7:26.1.0'). 清单文件的第二个实现行中似乎存在一些问题,即(实现'com.android.support:cardview-v7:26.1.0')。 I am creating a map based app there was no error in the whole project. 我正在创建一个基于地图的应用程序,整个项目中没有错误。 But this line is showing an error saying 但是此行显示错误信息

"All com.android.supprt libraries must use the exact same version specification (mixing versions can lead to run time run time crashes. Found version 26.1.0,25.2.0 .Examples include com.android.supprt:animated-vector-drawable:26.1.0 and com.android.supprt:mediarouter-v7:25.2.0 more...(Ctrl + F1)" “所有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)“

When rebuilding app this error shows in the below bar 重建应用程序时,此错误显示在下面的栏中

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

This is my Manifest File Please Check it out. 这是我的清单文件,请签出。 The error is in line number 15. 错误在第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.

相关问题 我只想在ICS版本上运行我的应用 - i want run my app only on version ICS over 每当我从一项活动转移到另一项活动时,我的应用程序就会崩溃 - my app crashes every time i move from one activity to another 在弹出菜单“ InvocationTargetException”中获取运行时错误 - Getting a run time error in popup menu “InvocationTargetException” 重命名android应用以同时安装第二个修改版本 - Renaming an android app to install a second modified version at the same time 大于1的android版本代码可以以0开头吗? - Can an android version code start with 0 if it is greater than 1? 升级路径:Min API可以“跳过”版本吗? - Upgrade path: Can Min API “skip” a version? 使用android 6.0运行时权限真的安全吗? - Is it really safe when using android 6.0 run time permission? 使用多模块项目处理Android M运行时权限 - Handling Android M run-time permissions with multi module project 当我运行我的应用程序时,它会在android中显示Java运行时异常(android映射中要标记群集) - When I Run My app it show Java Run time exception in android (want marker cluster in android map) 在运行时检测我的应用程序自己的android:versionCode - Detect my app's own android:versionCode at run time
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM