gpt4 book ai didi

找不到名称为 'default' 的 Android Studio Gradle 配置

转载 作者:IT老高 更新时间:2023-10-28 12:53:45 24 4
gpt4 key购买 nike

我在使用 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.

您能帮我处理这条消息吗?谢谢!

最佳答案

在我的例子中,使用 gradle tasks --info 编译后,日志就在那里:

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

所以找不到库的 build.gradle 文件。原因是文件夹结构。

原来是

-libraries
--volley
---VolleyLibrary

应该是这样的

-libraries
--VolleyLibrary

关于找不到名称为 'default' 的 Android Studio Gradle 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17188489/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com