Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/309.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
执行失败的进程命令/usr/lib/jvm/java-8-oracle/bin/java以非零退出值2结束_Java_Android_Build.gradle - Fatal编程技术网

执行失败的进程命令/usr/lib/jvm/java-8-oracle/bin/java以非零退出值2结束

执行失败的进程命令/usr/lib/jvm/java-8-oracle/bin/java以非零退出值2结束,java,android,build.gradle,Java,Android,Build.gradle,我在Android Studio上运行了一个应用程序,但出现了一个错误,如:任务org.gradle.process.internal ExecException process command/usr/lib/jvm/java-8-oracle/bin/java的执行失败,退出值为非零2 我的软件和硬件信息 操作系统=Ubuntu 15.04 kde 开发工具=Android Studio 1.3.2 CPU=英特尔i7 3610QM build.gradle apply plugin: 'c

我在Android Studio上运行了一个应用程序,但出现了一个错误,如:任务org.gradle.process.internal ExecException process command/usr/lib/jvm/java-8-oracle/bin/java的执行失败,退出值为非零2

我的软件和硬件信息

操作系统=Ubuntu 15.04 kde
开发工具=Android Studio 1.3.2
CPU=英特尔i7 3610QM

build.gradle

apply plugin: 'com.android.application'

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile project(':flatButtonLibrary')
    compile project(':ExpandableTextView')
    compile project(':EditTextFormLibrary')
    compile project(':RadioLibrary')
    compile project(':SmoothProgressBar')
    compile project(':TouchGalleryLibrary')
    compile project(':CardIOLibrary')
    compile project(':ViewPagerIndicatorLibrary')
    compile project(':PlayServices5')
    compile project(':SmoothProgressBarCircular')
    compile ('com.android.support:appcompat-v7:23.0.1')

}


android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"


    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')
    }
}

我曾多次面对这个问题,主要是重启你的Android Studio来解决这个问题

进入文件>无效缓存并重新启动


嗯。我解决了我的问题。我改变了这个

compile project(':CardIOLibrary')

我补充说

repositories {
    jcenter()
    mavenCentral()

}

使用Java7。Android支持Java1.7,我已经试过了。但是它不起作用。看看gradle控制台中的stacktrace,没有stacktrace就无法识别问题!!我根据你的要求更新了我的问题。。我添加了一个例外
compile 'io.card:android-sdk:5.0.1'
repositories {
    jcenter()
    mavenCentral()

}