在我的Android应用程序项目中,我想使用https://github.com/Bearded-Hen/Android-Bootstrap/tree/master/AndroidBootstrap作为依赖项(我使用Android Studio 0.8.8)。Android应用程序与Android库项目作为外部模块
这是我settings.gradle
include ':gui', ':client', ':Android-Bootstrap'
project(':Android-Bootstrap').projectDir=new File('/abs/path/to/Android-Bootstrap/AndroidBootstrap')
而且我的GUI /的build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.13.3'
}
}
apply plugin: 'com.android.application'
repositories {
mavenCentral()
}
android {
compileSdkVersion 19
buildToolsVersion "19.1"
defaultConfig {
minSdkVersion 10
targetSdkVersion 19
}
...
skipped
...
}
dependencies {
...skipped...
compile 'com.android.support:appcompat-v7:19.1.0'
...skipped...
compile project(':client')
compile project(':AndroidBootstrap')
}
当我摇篮同步,我得到::
Error:(1, 0) Plugin with id 'android-library' not found.
如果我删除
project(':Android-Bootstrap').projectDir=new File('/abs/path/to/Android-Bootstrap/AndroidBootstrap')
我得到
Error:(44, 0) Project with path ':AndroidBootstrap' could not be found in project ':gui'.
如果我改变https://github.com/Bearded-Hen/Android-Bootstrap/blob/master/AndroidBootstrap/build.gradle与
apply plugin: 'com.android.library'
我得到
Error:(1, 0) Plugin with id 'com.android.library' not found.
如果我加入https://github.com/Bearded-Hen/Android-Bootstrap/blob/master/AndroidBootstrap/build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.13.3'
}
}
我得到
Error:(44, 0) Project with path ':AndroidBootstrap' could not be found in project ':gui'.
如何解决?我希望这个模块是外部的,不需要导入并复制到主项目中。为什么修复gradle插件依赖导致找不到路径问题?
尝试'settings.gradle'with include':AndroidBootstrap' – 2014-10-31 16:22:41