在android studio中面临ProcessException问题。java.exe已完成,退出值为非零1

在android studio中面临ProcessException问题。java.exe已完成,退出值为非零1,java,android,android-studio,Java,Android,Android Studio,运行我的应用程序时遇到问题。获取错误,如下所述: Execution failed for task ':android-readerplus:dexDevDebug'. > com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' f

运行我的应用程序时遇到问题。获取错误,如下所述:

Execution failed for task ':android-readerplus:dexDevDebug'.
> com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1
日志:

梯度控制台:

build.gradle:


不知道是什么原因造成的。我检查了gradle文件,清理和重建了项目。我遇到过类似于这个问题的问题。但是没有解决。帮我解决这个问题,伙计们

支持v7与支持v4会产生冲突,而且您还添加了两个不同版本的appcompat,请尝试使用此依赖项

dependencies {
     androidTestCompile('com.jakewharton.espresso:espresso:1.1-r3') {
     exclude group: 'com.squareup.dagger', module: 'dagger'
     exclude group: 'javax.inject', module: 'javax.inject'
     exclude group: 'javax.annotation', module: 'javax.annotation-api'
    exclude group: 'com.google.code.findbugs', module: 'jsr305'

    }
     androidTestCompile('com.jakewharton.espresso:espresso-support-v4:1.1-r3') {
       exclude group: 'com.squareup.dagger', module: 'dagger'
    exclude group: 'javax.inject', module: 'javax.inject'
    exclude group: 'javax.annotation', module: 'javax.annotation-api'
    exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
    compile fileTree(include: ['*.jar'], exclude: 'android-support-v4.jar', dir: 'libs')
     compile 'com.google.android.gms:play-services:+'
     compile 'com.squareup.picasso:picasso:2.4.0'
     compile 'com.squareup.okio:okio:1.0.0'
     compile 'com.squareup.okhttp:okhttp:2.0.0'
     compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
     compile 'com.squareup:otto:1.3.4'
     compile 'com.squareup.retrofit:retrofit:1.6.1'
     compile 'com.squareup.dagger:dagger:1.2.1'
    compile(name: 'gutenberg-sdk-release', ext: 'aar')
    compile 'com.newrelic.agent.android:android-agent:4.244.0'
    compile 'se.emilsjolander:stickylistheaders:2.5.2'
    compile files('libs/crashlytics-1.1.11.jar')
    compile files('libs/sugar-1.3.jar')
    provided 'com.squareup.dagger:dagger-compiler:1.2.1'
    compile files('libs/zip4j_1.3.2.jar')
    compile files('libs/joda-time-2.3.jar')
    compile files('libs/android-query.0.26.7.jar')
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.android.support:appcompat-v7:22.2.0'
}
一,。从您的路径打开“studio.exe.vmoptions”,如下所示:

android studio安装位置\android studio\bin

二,。更改此内容:

三,。重新启动Android studio


希望这会有所帮助。

请张贴整个日志。!实际上,问题语句将位于此“任务执行失败…”语句上方。。!!把你的档案放好@Karthika@Karthika:你的机器内存是多少?。@Mamata Gelanee 4GB内存。从昨天开始,我就面临这个问题。在此之前,我可以毫无问题地运行应用程序
    AGPBI: {"kind":"SIMPLE","text":"warning: string \u0027newtext\u0027 has no default translation.","position":{},"original":"warning: string \u0027newtext\u0027 has no default translation."}

   Note: Some input files use or override a deprecated API.
   Note: Recompile with -Xlint:deprecation for details.
   Note: Some input files use unchecked or unsafe operations.
   Note: Recompile with -Xlint:unchecked for details.
  Error: Could not create the Java Virtual Machine.
  Error: A fatal exception has occurred. Program will exit.
  Invalid maximum heap size: -Xmx4g
  The specified size exceeds the maximum representable size.
  :android-readerplus:newRelicDeinstrumentTask
  [newrelic.info] Deinstrumenting...


   Error:Execution failed for task ':android-readerplus:dexDevDebug'.com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1
   Information:BUILD FAILED
   Information:Total time: 53.666 secs
   Information:1 error
  android {
        signingConfigs {
          debug {
        storeFile file("debug.keystore")
        storePassword "android"
        keyAlias "androiddebugkey"
        keyPassword "android"
    }
}
compileSdkVersion 22
buildToolsVersion '22.0.1'
def versionNumber = '1.28'
def propertiesFile = new File(project.rootDir, 'version.properties')
if (propertiesFile.canRead()) {
    def Properties properties = new Properties()

    properties.load(new FileInputStream(propertiesFile))

    def fileVersionNumber = properties['version_number']
    def fileVersionSequence = properties['version_sequence'].toInteger()

    if(!versionNumber.equals(fileVersionNumber)) {
        fileVersionSequence = 0
        properties['version_number'] = versionNumber
    }

    fileVersionSequence++

    properties['version_sequence'] = fileVersionSequence.toString()
    properties.store(propertiesFile.newWriter(), null)

    def DecimalFormat numberFormat = new DecimalFormat('000');
    def name = versionNumber + '.' + numberFormat.format(fileVersionSequence)

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 16
        versionCode 1
        versionName name
        applicationId "com.pearson.android.readerplus"
        testApplicationId "com.pearson.android.readerplus.test"
        testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner"

        // Enabling multidex support.
        multiDexEnabled true
    }
}
else {
    throw new GradleException("Could not read version.properties!")
}


repositories {
      flatDir {
         dirs 'libs'
      }
   }

  packagingOptions {
    exclude 'META-INF/LICENSE.txt'
    exclude 'LICENSE.txt'
    dexOptions {
        preDexLibraries = false
        javaMaxHeapSize "4g"
    }
}
buildTypes {
    debug {
        debuggable true
    }
    release {
        debuggable false
        minifyEnabled true
        proguardFile 'proguard-rules.pro'
        proguardFile getDefaultProguardFile('proguard-android.txt')
        signingConfig signingConfigs.debug
    }
}

lintOptions {
    abortOnError false
}
}

 dependencies {
   androidTestCompile('com.jakewharton.espresso:espresso:1.1-r3') {
     exclude group: 'com.squareup.dagger', module: 'dagger'
     exclude group: 'javax.inject', module: 'javax.inject'
     exclude group: 'javax.annotation', module: 'javax.annotation-api'
    exclude group: 'com.google.code.findbugs', module: 'jsr305'

    }
     androidTestCompile('com.jakewharton.espresso:espresso-support-v4:1.1-r3') {
       exclude group: 'com.squareup.dagger', module: 'dagger'
    exclude group: 'javax.inject', module: 'javax.inject'
    exclude group: 'javax.annotation', module: 'javax.annotation-api'
    exclude group: 'com.google.code.findbugs', module: 'jsr305'

    exclude group: 'com.android.support', module: 'support-v4'
}
     compile 'com.google.android.gms:play-services:+'
     compile 'com.squareup.picasso:picasso:2.4.0'
     compile 'com.squareup.okio:okio:1.0.0'
     compile 'com.squareup.okhttp:okhttp:2.0.0'
     compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
     compile 'com.squareup:otto:1.3.4'
     compile 'com.squareup.retrofit:retrofit:1.6.1'
     compile 'com.squareup.dagger:dagger:1.2.1'
     compile 'com.android.support:support-v4:19.+'
     compile 'com.android.support:appcompat-v7:19.+'
    compile(name: 'gutenberg-sdk-release', ext: 'aar')
    compile 'com.newrelic.agent.android:android-agent:4.244.0'
    compile 'se.emilsjolander:stickylistheaders:2.5.2'
    compile files('libs/crashlytics-1.1.11.jar')
    compile files('libs/sugar-1.3.jar')
    provided 'com.squareup.dagger:dagger-compiler:1.2.1'
    compile files('libs/zip4j_1.3.2.jar')
    compile files('libs/joda-time-2.3.jar')
    compile files('libs/android-query.0.26.7.jar')
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.android.support:appcompat-v7:22.2.0'

   }
dependencies {
     androidTestCompile('com.jakewharton.espresso:espresso:1.1-r3') {
     exclude group: 'com.squareup.dagger', module: 'dagger'
     exclude group: 'javax.inject', module: 'javax.inject'
     exclude group: 'javax.annotation', module: 'javax.annotation-api'
    exclude group: 'com.google.code.findbugs', module: 'jsr305'

    }
     androidTestCompile('com.jakewharton.espresso:espresso-support-v4:1.1-r3') {
       exclude group: 'com.squareup.dagger', module: 'dagger'
    exclude group: 'javax.inject', module: 'javax.inject'
    exclude group: 'javax.annotation', module: 'javax.annotation-api'
    exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
    compile fileTree(include: ['*.jar'], exclude: 'android-support-v4.jar', dir: 'libs')
     compile 'com.google.android.gms:play-services:+'
     compile 'com.squareup.picasso:picasso:2.4.0'
     compile 'com.squareup.okio:okio:1.0.0'
     compile 'com.squareup.okhttp:okhttp:2.0.0'
     compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
     compile 'com.squareup:otto:1.3.4'
     compile 'com.squareup.retrofit:retrofit:1.6.1'
     compile 'com.squareup.dagger:dagger:1.2.1'
    compile(name: 'gutenberg-sdk-release', ext: 'aar')
    compile 'com.newrelic.agent.android:android-agent:4.244.0'
    compile 'se.emilsjolander:stickylistheaders:2.5.2'
    compile files('libs/crashlytics-1.1.11.jar')
    compile files('libs/sugar-1.3.jar')
    provided 'com.squareup.dagger:dagger-compiler:1.2.1'
    compile files('libs/zip4j_1.3.2.jar')
    compile files('libs/joda-time-2.3.jar')
    compile files('libs/android-query.0.26.7.jar')
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.android.support:appcompat-v7:22.2.0'
}
-Xms128m
-Xmx4096m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=200m
-XX:+UseCompressedOops