android - 库gradle的重复条目导致应用程序无法运行

标签 android gradle android-gradle-2.2

我进行了大量搜索,但未找到解决问题的任何方法,我尝试在任何设备上运行我的应用程序,但出现此错误:

enter image description here

它使用com.github.bumptech.glide:glide:3.5.2引发了错误,但是它只使用过一次它的类是如何重复的,所以我在没有任何麻烦的情况下以相同的依赖关系运行了该应用程序,但是突然出现了此错误当我运行该应用程序时。

app.gradle文件

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.3'

defaultConfig {
    applicationId "info.androidhive.firebase"
    minSdkVersion 19
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

 dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.android.support:design:25.1.0'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
compile 'com.firebaseui:firebase-ui-storage:1.1.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.crystal:crystalrangeseekbar:1.1.1'
testCompile 'junit:junit:4.12'
}

 apply plugin: 'com.google.gms.google-services'

最佳答案

浏览到项目的“libs”目录,然后删除由于冗余而导致错误的冗余“glide.x.x”。

关于android - 库gradle的重复条目导致应用程序无法运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44514987/

相关文章:

java - Android 中的 SparseArray 克隆

android - 从 android 代码启动 libGdx

android - 关于我的Windows帐户名的Android Studio错误?

gradle - Gradle扩展名为Closure的NamedDomainObjectContainer

android -\build\intermediates\res\resources-anzhi-debug-stripped.ap _' specified for property ' resourceFile' 不存在

Android Studio - 项目结构几乎是空的

android - 移动网站开发的HTML先决条件?

Android 构建错误 : Program type already present: android. support.v7.app.**

android - 重复的 v4 支持问题。尝试了所有选项。需要帮助

android - ./gradlew 没有这样的文件或目录 - Android studio 2.3