“之后的资源冲突”;Foursquare“;Android本机应用程序开发的依赖注入
大家好:我正在使用Android本机应用程序开发的下一个场景: Android Studio 3.6.2 Graddle插件3.6.2 Graddle版本5.6.4 Kotlin版本1.3.61 我在build.graddle中编写下一个依赖注入 实现'com.foursquare:foursquare android oauth:1.1.0' 当我构建项目时,仅在注入之后(在打包阶段),我得到以下错误: 条目名称“res/drawable/notification\u bg\u low.xml”发生冲突 正如我在个人搜索中发现的,在项目“build.properties”文件中,我添加了下一个条目来修复错误:“之后的资源冲突”;Foursquare“;Android本机应用程序开发的依赖注入,android,code-injection,foursquare,Android,Code Injection,Foursquare,大家好:我正在使用Android本机应用程序开发的下一个场景: Android Studio 3.6.2 Graddle插件3.6.2 Graddle版本5.6.4 Kotlin版本1.3.61 我在build.graddle中编写下一个依赖注入 实现'com.foursquare:foursquare android oauth:1.1.0' 当我构建项目时,仅在注入之后(在打包阶段),我得到以下错误: 条目名称“res/drawable/notification\u bg\u low.xml
android {
packagingOptions {
exclude 'res/drawable/notification_bg_low.xml'
}
}
碰撞已解决,但会出现另一次碰撞。冲突(在每个构建过程中发现一个)是下一个冲突:
条目名称“AndroidManifest.xml”发生冲突
条目名称“res/drawable/notification_bg.xml”发生冲突
条目名称“res/drawable/notification\u bg\u low.xml”发生冲突
条目名称“res/layout/notification\u template\u part\u time.xml”发生冲突
条目名称“res/layout/notification\u template\u part\u chronometer.xml”发生冲突
条目名称“resources.arsc”发生冲突
到目前为止,我找到的唯一解决方法是将所有这些文件添加到我的Project build.graddle文件中:
android {
packagingOptions {
exclude 'AndroidManifest.xml'
exclude 'res/drawable/notification_bg.xml'
exclude 'res/drawable/notification_bg_low.xml'
exclude 'res/layout/notification_template_part_time.xml'
exclude 'res/layout/notification_template_part_chronometer.xml'
exclude 'resources.arsc'
}
}
我不知道这是不是正确的解决方案
你能帮帮我吗
提前感谢您。这里晚了几个月,但如果您升级到1.1.1版,应该可以解决此问题。库的POM中包含了一个不好的依赖项 在1.1.0上,您可以通过执行以下操作来摆脱它,而不会影响打包选项
实现(“com.foursquare:foursquare android oauth:1.1.0”){
排除(“com.google.android”、“android”)
}
这里晚了几个月,但如果升级到1.1.1版,应该可以解决问题。库的POM中包含了一个不好的依赖项
在1.1.0上,您可以通过执行以下操作来摆脱它,而不会影响打包选项
实现(“com.foursquare:foursquare android oauth:1.1.0”){
排除(“com.google.android”、“android”)
}
在打包中排除文件是否正确?在打包中排除文件是否正确?