当我尝试构建我的应用程序时,我面临以下问题:
发现有多个文件具有与操作系统无关的路径“ META-INF / INDEX.LIST”
我已经尝试解决将这些排除项包括在我的app / build.gradle中
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'
}
...问题仍然存在
我正在使用Java 8和最新的Android Studio稳定版本
答案 0 :(得分:0)
我找到了解决方法。
只需将其添加到PackagingOptions:
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/INDEX.LIST'
}