exclude gradle
- 作者: Baby_城会玩
- 来源: 51数据库
- 2020-09-24
这个问题一般是你在app的build.gradle文件中的依赖库 选项,重复依赖了某些lib库
解决办法如下:
1. 找到重复依赖的lib,删除该依赖的引用
2. 尝试在 app 的build.gradle目录下 加入defaultConfig {
? ?multiDexEnabled true
}
3. 如果还不奏效尝试在app的build.gradle目录下加入packagingOptions {
? ?exclude 'META-INF/NOTICE' // will not include NOTICE file
? ?exclude 'META-INF/LICENSE' // will not include LICENSE file
? ?// as noted by @Vishnuvathsan you may also need to include
? ?// variations on the file name. It depends on your dependencies.
? ?// Some other common variations on notice and license file names
? ?exclude 'META-INF/notice'
? ?exclude 'META-INF/notice.txt'
? ?exclude 'META-INF/license'
? ?exclude 'META-INF/license.txt'
}
我不会~~~但还是要微笑~~~:)
解决办法如下:
1. 找到重复依赖的lib,删除该依赖的引用
2. 尝试在 app 的build.gradle目录下 加入defaultConfig {
? ?multiDexEnabled true
}
3. 如果还不奏效尝试在app的build.gradle目录下加入packagingOptions {
? ?exclude 'META-INF/NOTICE' // will not include NOTICE file
? ?exclude 'META-INF/LICENSE' // will not include LICENSE file
? ?// as noted by @Vishnuvathsan you may also need to include
? ?// variations on the file name. It depends on your dependencies.
? ?// Some other common variations on notice and license file names
? ?exclude 'META-INF/notice'
? ?exclude 'META-INF/notice.txt'
? ?exclude 'META-INF/license'
? ?exclude 'META-INF/license.txt'
}
我不会~~~但还是要微笑~~~:)
推荐阅读
