android - 生成应用时显示错误

标签 android gradle

当我尝试构建我的应用程序时,它的构建过程停止在logcat中显示以下消息,它显示错误

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/lucasr/twowayview/BuildConfig.class



我的build.gradle文件是
android {
compileSdkVersion 25
buildToolsVersion '26.0.1'
defaultConfig {
    applicationId "community.infinity"
    minSdkVersion 16
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})

compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.android.support:support-v4:25.3.0'
    compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.adamstyrc.cookiecutter:cookie-cutter:1.0.2'
compile 'com.allattentionhere:fabulousfilter:0.0.3'
compile 'com.github.florent37:diagonallayout:1.0.6'
compile 'com.flaviofaria:kenburnsview:1.0.7'
compile 'com.github.developer-shivam:FeaturedRecyclerView:1.0.0'
compile 'com.xujinyang.BiuEditText:library:1.4.1'
compile 'com.vstechlab.easyfonts:easyfonts:1.0.0'
compile 'gun0912.ted:tedbottompicker:1.0.12'
compile 'com.github.nkzawa:socket.io-client:0.5.2'
compile group: 'com.google.code.gson', name: 'gson', version: '2.3.1'
compile 'org.lucasr.twowayview:twowayview:0.1.4'
compile 'org.lucasr.twowayview:core:1.0.0-SNAPSHOT@aar'
compile 'org.lucasr.twowayview:layouts:1.0.0-SNAPSHOT@aar'
compile 'com.android.support:multidex:1.0.1'

testCompile 'junit:junit:4.12'

}

最佳答案

您正在使用 SNAPSHOT 版本:

编译'org.lucasr.twowayview:core:1.0.0-SNAPSHOT@aar'

编译'org.lucasr.twowayview:layouts:1.0.0-SNAPSHOT@aar'

STABLE 版本都同时

编译'org.lucasr.twowayview:twowayview:0.1.4'

尝试删除其中任何一个。您一次只能使用一个。

访问:
https://github.com/lucasr/twoway-view

关于android - 生成应用时显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46693079/

相关文章:

android - 如何强制在Gradle Android构建上运行单元测试?

android - iOS 中 Localizable.strings 的基本样式

android - java.lang.IllegalStateException : Could not execute method of the activity with Android 错误

android - Gredlew任务名称-命令未运行Android Studio终端

gradle - 由于pom依赖性,无法创建我的JDA项目的JAR

android - connectedAndroidTest 和 release 构建类型

android - getChildCount() 在 ListView 上返回 0

android - imageview android的波浪动画

android - 使用 Dagger 2 注入(inject)服务

gradle - SourceSet 和 SourceDirectorySet、Gradle 之间的区别