错误,当试图调试我的应用程序 [英] Error, when try to debug my app

查看:136
本文介绍了错误,当试图调试我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:执行失败的任务':app:dexDebug'。


com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:进程'command'/ usr / lib / jvm / java-8-oracle / bin / java''以非零退出值2结束

blockquote>

我的build.gradle(app):

  apply plugin:'com .android.application'

android {
compileSdkVersion 23
buildToolsVersion23.0.2

packagingOptions {
exclude'META-INF /DEPENDENCIES.txt'
排除'META-INF / LICENSE.txt'
排除'META-INF / NOTICE.txt'
排除'META-INF / NOTICE'
排除'META-INF / LICENSE'
排除'META-INF / DEPENDENCIES'
排除'META-INF / notice.txt'
排除'META-INF / license.txt'
排除'META-INF / dependencies.txt'
排除'META-INF / LGPL2.1'
}

defaultConfig {
applicationIdcom.sevenlifes.way
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName1.0

multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}

依赖关系{
编译fileTree(dir:'libs',include:['* .jar'])

testCompile'junit: junit:4.12'

compile'c​​om.android.support:appcompat-v7:23.1.1'
compile'c​​om.android.support:design:23.1.1'
compile'c​​om.parse.bolts:bolts-android:1.3.0'
compile'c​​om.parse:parse-android:1.11.0'
compile'c​​om.fasterxml.jackson.core:jackson-注释:2.6.2'
compile'c​​om.fasterxml.jackson.core:jackson-databind:2.6.2'
compile'c​​om.google.android.gms:play-services-gcm:8.3。 0'
编译'com.google.android.gms:play-serv ices:8.3.0'
}

我试过了:

  defaultConfig {
multiDexEnabled true
}

和这个: https://developer.android。 com / tools / building / multidex.html



但没有任何帮助。

添加Google Map Api。
任何想法?

解决方案

  dexOptions {
incremental true
javaMaxHeapSize4g
}


Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 2

My build.gradle (app):

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
}

defaultConfig {
    applicationId "com.sevenlifes.way"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"

    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

testCompile 'junit:junit:4.12'

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.parse.bolts:bolts-android:1.3.0'
compile 'com.parse:parse-android:1.11.0'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.6.2'
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.2'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.google.android.gms:play-services:8.3.0'
}

I tried:

defaultConfig {
    multiDexEnabled true
}

and this: https://developer.android.com/tools/building/multidex.html

But nothing helped.

It began after adding Google Map Api. Any idea?

解决方案

dexOptions {
    incremental true
    javaMaxHeapSize "4g"
}

这篇关于错误,当试图调试我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆