close
Android 設定真的好多好雜好歡樂,最近開發遇到下述問題:
More than one file was found with OS independent path 'META-INF/ASL2.0' |
Google 查了一下,是因為有引用很多library,裡面有檔案會衝突,所以就寫下述的語法在build.gradle(Module:app)中來排解這些衝突,解法就是乾脆就不引入:
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude("META-INF/*.kotlin_module")
}
|
截圖如下:
Reference:
全站熱搜
留言列表