android - Execution failed for task ':app:dexDebug'. 65K method limitation -


i when try build application. have 65k method limitation? have put in multidexenabled true under default config , compile 'com.android.support:multidex:1.0.0' under dependencies?

agpbi: {"kind":"simple","text":"unexpected top-level error:","sources":[{}]} agpbi: {"kind":"simple","text":"java.lang.outofmemoryerror: java heap space","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.ssa.ssabasicblock.\u003cinit\u003e(ssabasicblock.java:124)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.ssa.ssabasicblock.newfromrop(ssabasicblock.java:147)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.ssa.ssamethod.convertroptossablocks(ssamethod.java:173)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.ssa.ssamethod.newfromropmethod(ssamethod.java:103)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.ssa.ssaconverter.converttossamethod(ssaconverter.java:44)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.ssa.optimizer.optimize(optimizer.java:98)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.ssa.optimizer.optimize(optimizer.java:72)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.dex.cf.cftranslator.processmethods(cftranslator.java:297)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.dex.cf.cftranslator.translate0(cftranslator.java:137)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.dex.cf.cftranslator.translate(cftranslator.java:93)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.command.dexer.main.processclass(main.java:729)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.command.dexer.main.processfilebytes(main.java:673)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.command.dexer.main.access$300(main.java:83)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.command.dexer.main$1.processfilebytes(main.java:602)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.cf.direct.classpathopener.processarchive(classpathopener.java:284)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.cf.direct.classpathopener.processone(classpathopener.java:166)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.cf.direct.classpathopener.process(classpathopener.java:144)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.command.dexer.main.processone(main.java:632)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.command.dexer.main.processallfiles(main.java:505)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.command.dexer.main.runmultidex(main.java:334)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.command.dexer.main.run(main.java:244)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.command.dexer.main.main(main.java:215)","sources":[{}]} agpbi: {"kind":"simple","text":"\tat com.android.dx.command.main.main(main.java:106)","sources":[{}]}  failure: build failed exception.  * went wrong: execution failed task ':app:dexdebug'. > com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command 'c:\program files\java\jdk1.8.0_65\bin\java.exe'' finished non-zero exit value 3 

build.gradle

apply plugin: 'com.android.application' apply plugin: 'android'  artifacts.add("default", file('gson-2.3.1.jar'))  dependencies {     compile files('libs/gson-1.6.jar')     compile 'com.google.android.gms:play-services:6.5.87'     compile 'com.squareup:android-times-square:1.5.0@aar'     compile 'com.google.code.gson:gson:1.6'     compile 'com.github.alamkanak:android-week-view:1.2.1'     compile files('libs/aniqroid.jar')     compile files('libs/joda-time-2.8.2.jar')     compile project(':filechooser')     compile 'com.github.philjay:mpandroidchart:v2.0.9'     compile 'com.github.citux:datetimepicker:0.1.2'     compile 'com.github.gcacace:signature-pad:1.0.1'     compile files('src/main/resources/commons-io-2.4.jar')     compile files('src/main/resources/commons-io-2.4-javadoc.jar')     compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'     compile files('libs/jackson-core-2.5.0.jar')     compile 'com.facebook.stetho:stetho:1.3.0'     compile 'com.facebook.stetho:stetho-okhttp3:1.3.0'     compile 'com.facebook.stetho:stetho-js-rhino:1.3.0'     compile 'com.android.support:multidex:1.0.0' } android {     compilesdkversion 21     buildtoolsversion "21.1.2"      defaultconfig {         applicationid "cimsmobile.lexcom.com"         minsdkversion 14         targetsdkversion 21         multidexenabled true     }      buildtypes {         release {             minifyenabled true             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt'         }     } } repositories {     maven { url "https://jitpack.io" } }  android {     packagingoptions {         exclude 'meta-inf/dependencies.txt'         exclude 'meta-inf/license.txt'         exclude 'meta-inf/notice.txt'         exclude 'meta-inf/notice'         exclude 'meta-inf/license'         exclude 'meta-inf/dependencies'         exclude 'meta-inf/notice.txt'         exclude 'meta-inf/license.txt'         exclude 'meta-inf/dependencies.txt'         exclude 'meta-inf/lgpl2.1'     } } 

google play services huge , don't need api's in should compile google play services need , not use

multidexenabled true

this can cause compile problems, unless absolutely need people tend enable without getting root of problem.

please navigate root of project in terminal in android studio , do:

 ./gradlew app:dependencies 

this list out dependencies compiling in app , chances have multiple duplicates considering number of libraries depending on.

the list of google play services located here under selectively compiling apis executable


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -