升级Android Studio 2.0 Preview4 部署项目遇到异常:
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForTaobaoDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.squareup.okio/okio/pom.propertiesFile1: /Users/yangyu/Work/Recorder/recorder/app/libs/com.umeng.message.lib_v2.5.0.jar
File2: /Users/yangyu/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.6.0/98476622f10715998eacf9240d6b479f12c66143/okio-1.6.0.jar
修改Module下build.gradle内packageOptions内文件无效
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
最后发现发现project项目中gradle 版本升级2.0.0 随后随后降版本到1.2.3后可以正常部署测试;
不清楚发生原因希望有大神可以解答;