没有检查依赖关系的等价于导出框是什么?
我目前拥有的是:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'
repositories {
maven {
url 'https://github.com/tanab/mvn-repo/raw/master/'
}
mavenCentral()
}
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.3.1'
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 8
targetSdkVersion 17
}
}
但这会使ABS在编译时导出,从而导致Dex Errors(Dex错误),该错误表明已添加Android Support Lib。
我无法在android studio依赖项编辑器中执行此操作,因为我在运行该应用程序时所做的任何更改都不会通过,
最佳答案
我还不熟悉android-library
插件。但是正如您所说的,您对支持库的依赖增加了两次。
通常,我将运行gradle dependencies
来查看所有树,并在排除传递依赖项以支持库(ref)之后:
dependencies {
compile('com.actionbarsherlock:actionbarsherlock:4.3.1') {
//excluding a particular transitive dependency:
exclude group: 'com.google.android', module: 'support-v4'
}
}
关于android - Gradle 等效导出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18905160/