Duplicate zip entry [114.jar:org/intellij/lang/annotations/Flow.class])

問題日誌:(概要)

:***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'
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章