今天用上Android Studio2.0正式版,編譯項目後出現以下錯誤: [plain] view plain copy 在CODE上查看代碼片派生到個人代碼片 Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForUmengDebug'.php
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.belerweb/pinyin4j/pom.properties
File1: C:\Users\CYM.gradle\caches\modules-2\files-2.1\com.belerweb\pinyin4j\2.5.0\5a620aedec0f779f2123ba60fd4b74bfbd3e2646\pinyin4j-2.5.0.jar
File2: C:\Users\CYM.gradle\caches\modules-2\files-2.1\com.belerweb\pinyin4j\2.5.0\5a620aedec0f779f2123ba60fd4b74bfbd3e2646\pinyin4j-2.5.0.jarandroid
解決辦法以下: 在build.grade裏的android裏添加: [plain] view plain copy 在CODE上查看代碼片派生到個人代碼片 packagingOptions {
exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.xml'
exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.properties'
}web