Android with Gradle (Java finished with non-zero exit value 2)

后端 未结 5 1693
渐次进展
渐次进展 2020-12-03 18:39

This is my .gradle file:

apply plugin: \'com.android.application\'

android {
    compileSdkVersion 21
    buildToolsVersion \"21.1.2\"

    defaultConfig {
         


        
5条回答
  •  盖世英雄少女心
    2020-12-03 19:34

    I think you should change your java JDK change jvm v8 for jdk7. This link can help you: Is it possible to use Java 8 for Android development?

    Other possible issue its dependency error, clean gradle before build. And change your jackson library for this:

    compile 'com.fasterxml.jackson.core:jackson-databind:2.2.+'
    compile 'com.fasterxml.jackson.core:jackson-core:2.2.+'
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.+'
    

提交回复
热议问题