`

finished with non zero exit value

阅读更多

For return value 3 "OutOfMemory exception" i added following in gradle android section

android {............
dexOptions {
    incremental =true;
    preDexLibraries =false
    javaMaxHeapSize "4g"// 2g should be also OK}............}

And for 2nd issue with return value 2, earlier i had following in gradle dependencies for JDK 7 

compile 'com.android.support:appcompat-v7:+'
compile 'com.google.android.gms:play-services:7+'
compile 'com.facebook.android:facebook-android-sdk:+'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:support-v4:+'

Then i updated my JDK to 8 and it started to give me error (probably for jdk 8 there were more than one libs available with 7+ ) while running the application. What fixed my issue is giving specific version instead of 7+. i.e. 

compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:support-v4:23.1.0'
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics