To run dex in process, the Gradle daemon needs a larger heap. It currently has 910 MB

前端 未结 3 844
误落风尘
误落风尘 2021-02-01 20:48

Actually the main error is \"java.exe finished with non-zero exit value 1\". First i tell you every problem which i faced after installing studio:

Three day

3条回答
  •  执笔经年
    2021-02-01 21:24

    I found the solution.

    Changes 1)

     dexOptions {
                javaMaxHeapSize "4g"
            }
    

    2)

     lintOptions {
                checkReleaseBuilds false
                abortOnError false
            }
    

    This is my new build.gradle and everything is working fine now.

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 23
        buildToolsVersion "24.0.0 rc4"
    
        dexOptions {
            javaMaxHeapSize "4g"
        }
        defaultConfig {
            applicationId "com.aquasoft.guesp"
            minSdkVersion 15
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
            multiDexEnabled true
        }
        lintOptions {
            checkReleaseBuilds false
            abortOnError false
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.4.0'
        compile 'com.mcxiaoke.volley:library-aar:1.0.0'
        compile 'com.android.support:recyclerview-v7:23.3.0'
        compile 'com.squareup.picasso:picasso:2.5.0'
        compile 'com.google.android.gms:play-services:9.0.0'
        compile 'com.android.support:design:23.4.0'
        compile 'com.stripe:stripe-android:+'
        compile 'com.roomorama:caldroid:3.0.1'
        compile 'com.android.support:cardview-v7:23.3.+'
    }
    

提交回复
热议问题