我想知道您能否提供帮助,我不是一个经验丰富的开发人员,但尝试过Android开发。我正在使用使用gradle的Android Studio。我收到以下编译错误:
Gradle: A problem occurred configuring project ':HelloWorld'.
Failed to notify project evaluation listener. Configuration with name 'default' not found.
我的文件夹结构是:HelloWorldProject .HelloWorld .libraries ..facebook ..build.gradle .src ..main ..build.gradle ...java ....com.helloworld .....firstPage .gradle ..wrapper ...gradle-wrapper.jar ...gradle-wrapper.properties .build.gradle .settings.gradle .gradle.properties
我的./build.gradle根目录为空
我的./setting.gradle文件包含:include ':libraries:facebook', ':HelloWorld'
我的./HelloWorld/build.gradle是:buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() } dependencies { dependencies { compile project(':libraries:facebook') } } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 14 targetSdkVersion 16 } }
我的./HelloWorld/src/build.gradle包含:buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() } dependencies { dependencies { compile project(':libraries:facebook') } } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 14 targetSdkVersion 16 } }
最佳答案
在大多数情况下,这里的问题是图书馆没有build.gradle文件。在这种情况下,它将是Facebook库。
关于gradle - Android Studio Gradle编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18557383/