Gradle Build failed with an exception : java.exe' finished with non-zero exit value 2

前端 未结 3 577
栀梦
栀梦 2021-01-17 03:08

build.gradle file:

android {
    compileSdkVersion 22
    buildToolsVersion \"22.0.1\"

    defaultConfig {
        applicationId \"xxxxx.com.myapp\"
                


        
3条回答
  •  一生所求
    2021-01-17 03:42

    Sometimes this build failed error occures due to multidex problem. As per looking into your build script it does not seems that you need multidex enabling ture. But still you can try this because I can not say much just seeing your gradle build script.Use

        defaultConfig {
                applicationId "xxxxx.com.myapp"
                minSdkVersion 9
                targetSdkVersion 22
                versionCode 3
                versionName "1.2"
                // enable Mutidex.
                multiDexEnabled true
    
    
            }
    

提交回复
热议问题