【发布时间】:2013-06-15 19:48:22
【问题描述】:
我在使用 Android Studio (0.1.5) 编译我的应用时遇到问题。 该应用程序使用了 2 个库,其中包括如下:
settings.gradle
include ':myapp',':library',':android-ColorPickerPreference'
build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
dependencies {
compile files('libs/android-support-v4.jar')
compile project(':library')
compile project(':android-ColorPickerPreference')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}
}
编译时我收到此消息:
Gradle: A problem occurred configuring project ':myapp'.
> Failed to notify project evaluation listener.
> Configuration with name 'default' not found.
您能帮我处理这条消息吗?谢谢!
【问题讨论】:
-
settings.gradle 中声明的库项目是否都在项目根目录中正确配置了 build.gradle 文件?还有 :library 和 :android-ColorPickerPreference 需要在你的目录结构中与你的 settings.gradle 文件处于同一级别的目录中?
-
当我的一个库项目中没有 build.gradle 文件时,我就出现了这个问题。创建此文件使错误消失。
-
在我的情况下,我的 gradle 配置文件之一丢失。它没有正确推送。
-
如何创建 gradle.build 文件..我也面临同样的问题?
标签: android gradle android-studio