Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,403 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.