我正在尝试建立我的第一个项目与格拉德尔,我认为我的格拉德尔文件和设置是正确的。
我只使用一个模块和 Support V4 + AppCompatBar 库。
项目建立,分级
allprojects {
repositories {
mavenCentral()
}
}
项目设置,分级
include ':AssignmentTempos21'
主模块,建造,梯级
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 8
targetSdkVersion 17
}
}
dependencies {
compile "com.android.support:support-v4:18.0.+"
compile "com.android.support:appcompat-v7:18.0.+"
}
控制台输出-i 标志:
MacBook-Air-de-Cesar-2:AssignmentTempos21 menor$ ./gradlew -i clean assemble
Starting Build
Settings evaluated using settings file '/Users/menor/workspace_android/AssignmentTempos21/settings.gradle'.
Projects loaded. Root project using build file '/Users/menor/workspace_android/AssignmentTempos21/build.gradle'.
Included projects: [root project 'AssignmentTempos21', project ':AssignmentTempos21']
Evaluating root project 'AssignmentTempos21' using build file '/Users/menor/workspace_android/AssignmentTempos21/build.gradle'.
Compiling build file '/Users/menor/workspace_android/AssignmentTempos21/build.gradle' using BuildScriptClasspathScriptTransformer.
Compiling build file '/Users/menor/workspace_android/AssignmentTempos21/build.gradle' using BuildScriptTransformer.
Evaluating project ':AssignmentTempos21' using build file '/Users/menor/workspace_android/AssignmentTempos21/AssignmentTempos21/build.gradle'.
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/support-v4/]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/support-v4/]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/support-v4/]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/support-v4/]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/appcompat-v7/]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/appcompat-v7/]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/appcompat-v7/]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml]
Resource missing. [HTTP GET: http://repo1.maven.org/maven2/com/android/support/appcompat-v7/]
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':AssignmentTempos21'.
> Failed to notify project evaluation listener.
> Could not resolve all dependencies for configuration ':AssignmentTempos21:_DebugCompile'.
> Could not find any version that matches com.android.support:support-v4:18.0.+.
Required by:
AssignmentTempos21:AssignmentTempos21:unspecified
> Could not find any version that matches com.android.support:appcompat-v7:18.0.+.
Required by:
AssignmentTempos21:AssignmentTempos21:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 40.787 secs