我有這樣的目錄結構:相對搖籃項目依賴與HoloEverywhere
Project
contrib/
holo-everywhere
library
addons/
slider
preferences
app-library
app-one
app-two
settings.gradle
我settings.gradle看起來像這樣
include 'contrib:holo-everywhere:library'
include 'contrib:holo-everywhere:addons:preferences'
include 'contrib:holo-everywhere:addons:slider'
include 'app-library'
include 'app-one'
include 'app-two'
contrib:holo-everywhere:addons:preferences
取決於contrib:holo-everywhere:library
。
dependencies {
compile project(':contrib:holo-everywhere:library')
}
contrib:holo-everywhere:library
構建成功,當contrib:holo-everywhere:addons:preferences
正在修建我得到一些不清楚的錯誤。
:contrib:holo-everywhere:addons:preferences:compileLint
:contrib:holo-everywhere:addons:preferences:copyReleaseLint UP-TO-DATE
:contrib:holo-everywhere:addons:preferences:mergeReleaseProguardFiles UP-TO-DATE
:contrib:holo-everywhere:addons:preferences:packageReleaseAidl UP-TO-DATE
:contrib:holo-everywhere:addons:preferences:preBuild UP-TO-DATE
:contrib:holo-everywhere:addons:preferences:preReleaseBuild UP-TO-DATE
:contrib:holo-everywhere:addons:preferences:preDebugBuild UP-TO-DATE
:contrib:holo-everywhere:addons:preferences:preTestBuild UP-TO-DATE
:contrib:holo-everywhere:addons:preferences:prepareMdAndroidContribHoloEverywhereLibraryUnspecifiedLibrary FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':contrib:holo-everywhere:addons:preferences:prepareMdAndroidContribHoloEverywhereLibraryUnspecifiedLibrary'.
> File '/home/project/contrib/holo-everywhere/library/build/libs/library.aar' specified for property 'bundle' does not exist.
我種得到的感覺是,問題就在這裏:
dependencies {
compile project(':contrib:holo-everywhere:library')
}
這是定義依賴正確的方法是什麼?
更新: 添加holo-everywhere
build.gradle
內容。
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
allprojects {
group = 'org.holoeverywhere'
version = '2.0.0-SNAPSHOT'
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://github.com/Prototik/HoloEverywhere/raw/repo"
}
}
tasks.withType(Compile) {
options.encoding = "UTF-8"
}
}
apply plugin: 'android-reporting'
您是否在指定路徑中看到文件'library.aar'?或者它可能在那裏,但它的名字中有一個版本號? –
是的,它'library.aar'在那裏,它的名字中有版本號。 –
我更新了另一個版本定義的build.gradle文件的問題。什麼是正確的方式來定義特定的項目依賴版本? –