java - 安卓工作室 : finished with non-zero exit value2

标签 java android android-studio

这几天一直在学习如何使用隐藏的API,我知道如何使用classes.jar。
我将这个 classes.jar 作为库放在应用程序模块中。

当我运行这个应用程序时,我得到

"Error:Execution failed for task ':app:dexDebug'.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 2"

我真的希望有人能帮助我。

build.gradle:

apply plugin: 'com.android.application'
android {
    compileSdkVersion 19
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.android.wifidisplay"
    }

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

dependencies {
    compile files('classes-dex2jar.jar')
}

最佳答案

这个问题在这里回答了

https://stackoverflow.com/a/30028505

这个答案对我有用

关于java - 安卓工作室 : finished with non-zero exit value2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29890496/

相关文章:

java - 使用 Apache Async Http 客户端进行异步响应流

android - 从我的 android 应用程序向 chrome 发送/接收消息

android-studio - 断言失败: bool 表达式不能为null?如何解决这个问题?

java - 在java中将List<Document>解析为列表

java - Thread.interrupt() 被忽略

java - 如何更改 SearchView 下方底线的颜色

java - 如何使用操作栏上的按钮打开另一个 Activity ?

android - Android Studio 和 Eclipse 开发调试的区别

android - 无法解析 ':app@release/compileClasspath' : Could not resolve com. firebase :firebase-client-android:2. 3.1 的依赖关系

java - 列表已满时抛出IllegalArgumentException