【发布时间】:2018-04-12 22:10:22
【问题描述】:
您好,我的build.gradle 文件有问题:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.dell"
minSdkVersion 19
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:design:26.1.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-firestore:12.0.1'
implementation 'com.firebaseui:firebase-ui-firestore:3.3.0'
implementation 'hanks.xyz:htextview-library:0.1.5'
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'
}
Android Studio 给了我这个警告:
所有 com.android.support 库必须使用完全相同的版本 规范(混合版本可能导致运行时崩溃)。成立 版本 27.1.0、26.1.0。例子包括 com.android.support:recyclerview-v7:27.1.0 和 com.android.support:animated-vector-drawable:26.1.0
有人可以帮帮我吗?我不知道该怎么办。我什至尝试将其设置为 v 27。我什至删除了它,但它仍然没有解决我的问题。
我也看到了这个错误:
错误:任务执行失败 ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: 无法合并 索引
【问题讨论】:
-
有什么问题?
-
问题说我的recycle view是v7 27,支持是version 26,不知道怎么解决
-
请发布完整的 gradle 文件
-
@LeviAlbuquerque 我有一个新问题,如果你能看一下,我将不胜感激
标签: android android-studio gradle android-gradle-plugin