Android的工作室摇篮配置名为“默认”未找到 [英] Android Studio Gradle Configuration with name 'default' not found

查看:169
本文介绍了Android的工作室摇篮配置名为“默认”未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有编制与Android工作室(0.1.5)我的应用程序的问题。 该应用程序使用,我已经包括2库如下:

I am having problems compiling my app with Android Studio (0.1.5). The app uses 2 libraries which I have included as follows:

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
    }
}

在编译我得到这个消息:

When compiling I get this message:

  Gradle: A problem occurred configuring project ':myapp'.
   > Failed to notify project evaluation listener.
   > Configuration with name 'default' not found.

你能不能帮我这个消息?谢谢!

Could you help me with this message? Thanks!

推荐答案

在我的情况下,用摇篮任务--info编译后,日志在那里:

In my case, after compiling with "gradle tasks --info", the log was there :

评估项目:VolleyLibrary:库   文件。

"Evaluating project ':libraries:VolleyLibrary' using empty build file."

因此​​未能找到库build.gradle文件。 原因是文件夹结构。

So it failed to find build.gradle file of the library. Reason is the folder structure.

这是

-libraries
--volley
---VolleyLibrary

有被认为是

-libraries
--VolleyLibrary

这篇关于Android的工作室摇篮配置名为“默认”未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆