Eclipse移植Android Studio Gradle编译报Execution failed for task 文件混淆错误input jar file is specified twice

提示如下错误:
 Warning:Exception while processing task java.io.IOException: The same input jar [G:\test\Jooan\app\libs\universal-image-loader-1.9.3.jar] is specified twice.

Hello World 2016/6/29 9:30:56

:app:transformClassesAndResourcesWithProguardForRelease FAILED

Hello World 2016/6/29 9:31:00

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> java.io.IOException: The same input jar [G:\test\Jooan\app\libs\universal-image-loader-1.9.3.jar] is specified twice.

解决思路:
删除   -libraryjars libs/***.jar  from your proguard-rules.pro file.
找到:

原因是build.gradle文件配置了


dependencies {     compile fileTree(include: '*.jar', dir: 'libs')

}

里面已经添加过jar包,混淆文件proguard-rules.pro里面又加了句-libraryjars libs/***.jar,将-libraryjars libs/***.jar 前面用#号注释或者直接删掉即可。



你可能感兴趣的:(Android)