问题描述
我有这样的目录结构:
项目
的contrib /
全息无处不在
图书馆
插件/
滑块
preferences
应用程序库
应用一
应用二
settings.gradle
我的settings.gradle看起来像这样
有的contrib:全息无处不在:库
包括的contrib:全息无处不在:插件:preferences
包括的contrib:全息无处不在:插件:滑盖
包括应用程序库
包括应用程序合一
包括应用程序,两个
的contrib:全息无处不在:插件:preferences
依赖于的contrib:全息无处不在:库
相关性{
编制项目(:contrib请:全息无处不在:图书馆)
}
的contrib:全息无处不在:库
构建成功,当的contrib:全息无处不在:插件:preferences
正在建设中,我得到了一些不明的错误。
:contrib请:全息无处不在:插件:preferences:compileLint
:contrib请:全息无处不在:插件:preferences:copyReleaseLint UP-TO-DATE
:contrib请:全息无处不在:插件:preferences:mergeReleaseProguardFiles UP-TO-DATE
:contrib请:全息无处不在:插件:preferences:packageReleaseAidl UP-TO-DATE
:contrib请:全息无处不在:插件:preferences:preBuild UP-TO-DATE
:contrib请:全息无处不在:插件:preferences:preReleaseBuild UP-TO-DATE
:contrib请:全息无处不在:插件:preferences:preDebugBuild UP-TO-DATE
:contrib请:全息无处不在:插件:preferences:preTestBuild UP-TO-DATE
:contrib:holo-everywhere:addons:$p$pferences:$p$ppareMdAndroidContribHoloEverywhereLibraryUnspecifiedLibrary失败
失败:建立失败,一个例外。
* 什么地方出了错:
一个问题被发现与任务的配置':contrib:holo-everywhere:addons:$p$pferences:$p$ppareMdAndroidContribHoloEverywhereLibraryUnspecifiedLibrary'.
>文件'/home/project/contrib/holo-everywhere/library/build/libs/library.aar'财产'捆绑'指定不存在。
我种得到的感觉,问题就在这里:
相关性{
编制项目(:contrib请:全息无处不在:图书馆)
}
这是定义依赖正确的方法是什么?
更新:添加全息无处不在
build.gradle
的内容。
buildscript {
库{
mavenCentral()
}
依赖{
类路径com.android.tools.build:gradle:0.5.+
}
}
allprojects {
组='org.holoeverywhere
版本=2.0.0快照
库{
mavenLocal()
mavenCentral()
行家{
URLhttps://github.com/Prototik/HoloEverywhere/raw/repo
}
}
tasks.withType(编译){
options.encoding =UTF-8
}
}
应用插件:Android的报告
有些人报道了类似的使用在 allprojects
部分的 Android的插件版本号时,问题
。可能是该插件的错误。尝试删除的版本,看它是否改变任何东西。
I have this directory structure:
Project
contrib/
holo-everywhere
library
addons/
slider
preferences
app-library
app-one
app-two
settings.gradle
My settings.gradle looks like this
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
depends on contrib:holo-everywhere:library
.
dependencies {
compile project(':contrib:holo-everywhere:library')
}
contrib:holo-everywhere:library
is built successfully and when contrib:holo-everywhere:addons:preferences
is being built I get some unclear error.
: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.
I kind of get the feeling that the problem is here:
dependencies {
compile project(':contrib:holo-everywhere:library')
}
Is this the correct way to define dependency?
Update:Adding holo-everywhere
build.gradle
content.
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'
Some people have reported a similar problem when using a version number in the allprojects
section with the android-plugin
. Could be a bug in that plugin. Try removing the version to see if it changes anything.
这篇关于相对摇篮项目依赖与HoloEverywhere的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!