Proguard问题Roboguice重复导入

时间:2015-03-10 12:30:18

标签: android gradle roboguice android-espresso robolectric-gradle-plugin

当我运行gradle构建时,我遇到了一个问题。似乎有重复的依赖项被导入但发现很难调试,任何建议都会很棒。

Error:Execution failed for task ':proguardDebug'.
  

java.io.IOException:无法写[....... \ build \ intermediates \ classes-proguard \ debug \ classes.jar](无法读取[....... gradle] \ caches \ modules-2 \ files-2.1 \ org.roboguice \ roboguice \ 3.0.1 \ 24e814f35d5cc28eaa7e9f07a50ea69deeb2b544 \ roboguice-3.0.1.jar(;;;;;;!META-INF / MANIFEST.MF)](重复邮编条目[roboguice-3.0.1.jar:javax / inject / Inject.class]))

 dependencies {
repositories {
    mavenCentral()
}
compile 'com.google.android:multidex:0.1'
compile files('libs/aws-android-sdk-1.7.1.1.jar')
compile 'com.makeramen:roundedimageview:1.3.0'
compile 'com.github.chrisbanes.actionbarpulltorefresh:library:+'
compile 'com.squareup.picasso:picasso:2.3.3'
compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
compile 'org.springframework.android:spring-android-core:1.0.1.RELEASE'
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'com.google.android.gms:play-services:+'
compile 'com.androidmapsextensions:android-maps-extensions:2.1.+'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.android.support:support-v4:20.+'
compile 'com.jeremyfeinstein.slidingmenu:library:1.3@aar'
compile('com.commonsware.cwac:camera-v9:0.6.+') {
    exclude module: 'support-v4'
}
compile 'com.squareup:otto:1.3.6'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
compile 'com.squareup.okhttp:okhttp:2.2.0'
compile 'com.squareup.okio:okio:1.2.0'
compile project(':libraries:facebook')
compile files('libs/Catalano.Core.jar')
compile files('libs/Catalano.Android.Image.jar')
compile files('libs/Catalano.Math.jar')
compile 'org.roboguice:roboguice:3.+'
provided 'org.roboguice:roboblender:3.+'
compile 'com.google.code.findbugs:jsr305:3.0.0'

compile 'com.android.support.test.espresso:espresso-core:2.0'
compile 'com.android.support.test:testing-support-lib:0.1'
compile 'com.android.support.test.espresso:espresso-contrib:2.0'
compile 'junit:junit:4.12'
compile 'org.hamcrest:hamcrest-core:1.1'
compile 'org.hamcrest:hamcrest-library:1.1'
compile 'org.hamcrest:hamcrest-integration:1.1'
compile('org.robolectric:robolectric:2.4') {
    exclude module: 'classworlds'
    exclude module: 'commons-logging'
    exclude module: 'httpclient'
    exclude module: 'maven-artifact'
    exclude module: 'maven-artifact-manager'
    exclude module: 'maven-error-diagnostics'
    exclude module: 'maven-model'
    exclude module: 'maven-project'
    exclude module: 'maven-settings'
    exclude module: 'plexus-container-default'
    exclude module: 'plexus-interpolation'
    exclude module: 'plexus-utils'
    exclude module: 'wagon-file'
    exclude module: 'wagon-http-lightweight'
    exclude module: 'wagon-provider-api'
}

1 个答案:

答案 0 :(得分:3)

您可以通过在项目根目录中运行此命令来确定引入依赖项的内容:

./gradlew app:androidDependencies

您将获得类似于此的输出: Android Dependencies Output

另外,如果您使用Gradle拉入所有内容,请不要忘记检查您的app / libs /文件夹以确保它是空的。