Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Diego Marrs
Diego Marrs
8,243 Points

First Result from Daemon was Empty; Gradle Build Continues to Fail

For almost a week now, I dealt with an issue regarding gradle; every time my application tries to refresh gradle, it gives me an error:

Error: The first result from the daemon was empty. Most likely the process died immediately after connection.

Side note: So far, I could only find two StackOverflow posts regarding this issue, none of the solutions were helpful. First and second.

I'm currently using Gradle 2.14.1 (Android plugin version 2.1.3).

Here is my build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

gradle.wrapper:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

Please help.

Seth Kroger
Seth Kroger
56,412 Points

I'm starting to think a complete uninstall and reinstall of Android Studio and Java may be in order. Also any SDKs/Tools you have as well (remove them first in Studio and reinstall with the new one).

Diego Marrs
Diego Marrs
8,243 Points

Just tried that, also tried running as administrator too, nothing worked.