Why Android Studio generate signed APK failed? -


when import weibosdkcore_3.1.4.jar , libweibosdkcore.so, building release .apk file doesn't work.

weibosdkcore_3.1.4.jar in path: app/libs/

libweibosdkcore.so in path: app/src/main/jnilibs/


build.gradle:

apply plugin: 'com.android.application' apply plugin: 'android-apt'  android {     compilesdkversion 24     buildtoolsversion '24.0.2'     uselibrary 'org.apache.http.legacy'     defaultconfig {         applicationid "com.aaaa.bbbb"         minsdkversion 19         targetsdkversion 24         versioncode 20161019         versionname "2.1.1"         multidexenabled true     }      buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }     }     packagingoptions {         exclude 'meta-inf/license.txt'         exclude 'meta-inf/notice.txt'         exclude 'meta-inf/services/javax.annotation.processing.processor'         lintoptions {             abortonerror false         }     }  }  buildscript {     repositories {         jcenter()         maven {             url "http://mvn.leancloud.cn/nexus/content/repositories/releases"         }      }     dependencies {         classpath 'com.android.tools.build:gradle:2.2.2'     } }  allprojects {     repositories {         jcenter()         maven {             url "http://mvn.leancloud.cn/nexus/content/repositories/releases"         }     } }  dependencies {     compile filetree(include: ['*.jar'], dir: 'libs')     testcompile 'junit:junit:4.12'     compile 'com.android.support:appcompat-v7:24.2.1'     compile 'com.android.support:design:24.2.1'     compile 'com.google.android:flexbox:0.2.3'     compile 'com.android.support:cardview-v7:24.2.1'     compile 'com.android.support:recyclerview-v7:24.2.1'     compile 'com.github.bumptech.glide:glide:3.7.0'     compile 'com.android.support:support-v4:24.2.1'     compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'     compile 'com.bigkoo:convenientbanner:2.0.5'     compile 'com.code19.library:library:0.1.0'     compile 'com.google.code.gson:gson:2.6.2'     compile 'com.squareup.okhttp3:okhttp:3.3.1'     compile 'com.squareup.okio:okio:1.8.0'     compile 'com.zhy:okhttputils:2.6.2'     compile 'jp.wasabeef:glide-transformations:2.0.1'     compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'     compile 'com.pingxx:pingpp-core:2.1.+'     compile 'com.pingxx:pingpp-alipay:2.1.+'     compile 'com.pingxx:pingpp-wxpay:2.1.+'     compile 'org.greenrobot:eventbus:3.0.0'     compile 'org.apache.commons:commons-lang3:3.4'     compile 'com.lovedise:permissiongen:0.0.6'     compile 'com.github.anzewei:parallaxbacklayout:0.4'     compile 'cn.leancloud.android:avoscloud-sdk:v3.14.5'     compile('cn.leancloud.android:avoscloud-push:v3.+@aar') { transitive = true }     compile 'com.jakewharton:butterknife:8.4.0'     apt 'com.jakewharton:butterknife-compiler:8.4.0'     compile 'com.facebook.fresco:fresco:0.12.0'     compile files('libs/mipush_sdk_client_3_1_2.jar')     compile files('src/main/jnilibs/baidulbs_android.jar')     compile 'cn.bingoogolapple:bga-banner:2.0.4@aar'     compile 'com.nineoldandroids:library:2.4.0'     compile 'com.basecamp:turbolinks:1.0.4'     compile 'com.umeng.analytics:analytics:latest.integration'     compile 'com.sensorsdata.analytics.android:sensorsanalyticssdk:latest.integration'       compile files('libs/weibosdkcore_3.1.4.jar') } 

i build 3 times ,the error messages are:

error:  @ java.util.zip.zipfile.getinputstream(zipfile.java:374) error:  @ com.android.dx.cf.direct.classpathopener.processarchive(classpathopener.java:270) error:java.lang.outofmemoryerror: gc overhead limit exceeded error:unexpected top-level error: error:  @ java.util.zip.zipfile$zipfileinflaterinputstream.<init>(zipfile.java:393) error:  @ java.util.zip.inflaterinputstream.<init>(inflaterinputstream.java:187) error:  @ com.android.dx.cf.direct.classpathopener.processone(classpathopener.java:166) error:  @ com.android.dx.cf.direct.classpathopener.process(classpathopener.java:144) error:  @ com.android.dx.command.dexer.main.processone(main.java:677) error:  @ com.android.dx.command.dexer.main.processallfiles(main.java:569) error:  @ com.android.dx.command.dexer.main.runmultidex(main.java:366) error:  @ com.android.dx.command.dexer.main.run(main.java:275) error:  @ com.android.dx.command.dexer.main.main(main.java:245) error:  @ com.android.dx.command.main.main(main.java:106) error:execution failed task ':app:transformclasseswithdexforjdxlrelease'. > com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception:              java.util.concurrent.executionexception: java.lang.unsupportedoperationexception 

error:uncaught translation error: java.util.concurrent.executionexception: java.lang.outofmemoryerror: gc overhead limit exceeded error:1 error; aborting error:execution failed task ':app:transformclasseswithdexforjdxlrelease'. > com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception:     java.util.concurrent.executionexception: java.lang.unsupportedoperationexception 

error:unexpected top-level error: error:java.lang.outofmemoryerror: gc overhead limit exceeded error:execution failed task ':app:transformclasseswithdexforjdxlrelease'. > com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception: java.util.concurrent.executionexception: java.lang.unsupportedoperationexception 

hope teach me thing or two? :(

you can find reason behind issue here. http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#par_gc.oom

also find option disable garbage collection feature in above link.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -