Closed ubeyou closed 10 years ago
Show your build.gradle or I can't really know what went wrong On Apr 2, 2014 8:02 PM, "Tan Jit Ren" notifications@github.com wrote:
Build tools null missing. Downloading....
FAILURE: Build failed with an exception.
-
What went wrong: A problem occurred configuring root project.
java.lang.NullPointerException (no error message)
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 6.224 secs
Reply to this email directly or view it on GitHubhttps://github.com/JakeWharton/sdk-manager-plugin/issues/9 .
I applied sdk manager code in the wrong build.gradle file and now I moved it into another build gradle. it worked.
I actually added a check for this that will be included in the next release.
I'm facing same issue with plugin version 0.12.+
I have multi-project layout. Root project does not contain much but
allprojects {
apply plugin: 'maven'
group = 'com.mycorp'
version = '99.9999999'
}
The android subproject contains this:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.+'
}
}
apply plugin: 'android-sdk-manager'
apply plugin: 'android'
android {
compileSdkVersion 20
buildToolsVersion '20.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 20
versionCode 1
versionName project.version
}
}
dependencies {
// ... quite some stuff here
}
This also seems to happen when there are errors in the build.gradle, but afterEvaluate() still gets called. In this case I get:
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
Build tools null missing. Downloading....
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project.
BUILD FAILED
Total time: 6.224 secs