0

我通过gradle在我的 Android Studio 项目中导入了两个库。一个是支持库 v7,它是在我的应用程序中针对不同平台处理操作栏的必要组件。另一个是我打算用于 UI 组件的一个,称为MaterialDesign

问题是这两个库都在它们的values.xml中定义了一个名为ippleColor 的属性,并且gradle 标识了冲突

我如何告诉 gradle 排除一个定义并接受另一个定义?android 开发人员中心中的清单合并似乎在整个 xml 文件中执行此操作,而我的问题只是该文件中的一个特定属性。有什么办法可以解决这个问题吗?

PS我的gradle依赖如下:

compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'org.xwalk:xwalk_core_library:15.44.384.13'
compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
4

1 回答 1

0

在成绩文件中写入以下代码。它可能会有所帮助:

dependencies {
    compile 'com.android.support:support-v4:22.2.1'
    compile 'com.google.code.gson:gson:2.2.2'
    compile 'com.google.android.gms:play-services:7.5.0'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.android.support:design:22.2.1'

   compile fileTree(dir: 'libs', include: '*.jar')
    compile fileTree(include: ['*.jar'], dir: 'libs')
}
于 2016-01-04T11:20:05.147 回答