JakeWharton / sdk-manager-plugin

DEPRECATED Gradle plugin which downloads and manages your Android SDK.
Apache License 2.0
1.41k stars 132 forks source link

Build tools null missing. Downloading.... #9

Closed ubeyou closed 10 years ago

ubeyou commented 10 years ago

Build tools null missing. Downloading....

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 6.224 secs

JakeWharton commented 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 .

ubeyou commented 10 years ago

I applied sdk manager code in the wrong build.gradle file and now I moved it into another build gradle. it worked.

JakeWharton commented 10 years ago

I actually added a check for this that will be included in the next release.

dant3 commented 9 years ago

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
}
ksperling commented 9 years ago

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.