问题日志:(概要)
:***App:transformClassesWithMultidexlistForChannel_test FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':***App:transformClassesWithMultidexlistForChannel_test'. > java.io.IOException: Can't write [/var/lib/jenkins/workspace/***ang_android/***Android/***App/build/intermediates/multi-dex/channel/_test/componentClasses.jar] (Can't read [/var/lib/jenkins/workspace/***_android/***Android/***App/build/intermediates/transforms/***Transform/channel/_test/114.jar(;;;;;;**.class)] (Duplicate zip entry [114.jar:org/intellij/lang/annotations/Flow.class])) * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. * Get more help at https://help.gradle.org BUILD FAILED in 3m 46s 120 actionable tasks: 114 executed, 6 up-to-date Build step 'Invoke Gradle script' changed build result to FAILURE Build step 'Invoke Gradle script' marked build as failure Set build name. New build name is '#272 develop/** assembleChannel_test' Variable with name 'BUILD_DISPLAY_NAME' already exists, current value: '#272 develop/** assembleChannel_test', new value: '#272 develop/** assembleChannel_test' Finished: FAILURE
出现背景:
接入SVGA动画库后,本地编译正常,但打包异常。
原因:
SVGA的依赖库中存在与本地冲突的文件,由日志可以看出是:org.intellij.lang.annotations.Flow,这个类
解决办法:
在APP的build.gradle文件,android{}中配置:
configurations {
compile.exclude group : 'org.jetbrains' , module : 'annotations'
}