Gradle ProcessException

Nachdem ich meine Eclipse Projekt nach AndroidStudio migriert habe, bekomme ich folgende Exception (sowohl bei der „Monitor-“ als auch „Wartungs-App“) beim Run geworfen.:

Error:Execution failed for task ‚:de.xxx.xxx.monitor:dexDebug‘.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‚command ‚C:\Program Files (x86)\Java\jdk1.8.0_25\bin\java.exe‘‘ finished with non-zero exit value 1

Sitze schon den zweiten Tag an diesem Problem und komme nicht weiter… Ich hoffe irgendjemand von euch kann mir weiterhelfen, damit ich die Apps endlich wieder zum Starten bringe über AndroidStudio.

Projekt-Struktur:

Projekt build.gradle:

buildscript {

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

Module tablefixheaders:


dependencies {
}

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    defaultConfig {
        // Enabling multidex support.
        multiDexEnabled true
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}

Module library:


dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:support-v4:22.2.0'
}

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    defaultConfig {
        // Enabling multidex support.
        multiDexEnabled true
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}

Module Monitor:


dependencies {
    compile project(':de.xxx.android.library')
    compile project(':com.inqbarna.tablefixheaders')
}

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    defaultConfig {
        // Enabling multidex support.
        multiDexEnabled true
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}

Module Wartung:


dependencies {
    compile project(':de.xxx.android.library')
    compile project(':com.inqbarna.tablefixheaders')
}

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}

In der settings.gradle sind sind die Module „de.xxx.android.library“ und "com.inqbarna.tablefixheaders"als libraries deklariert.

include ':de.xxx.android.wartung'
include ':com.inqbarna.tablefixheaders:library'
include ':de.xxx.android.library:library'

Das Module „de.xxx.android.library“ hat folgende Struktur:

Android unterstützt noch nicht Java 8. Stell deinen Compiler auf eine Java 7 Installation um und probier es erneut.