android - Build APK - ERROR - app:transformClassesWithDexForDebug -
i watched many threads here , still didnt find working solution.
when want build apk, main error:
error:execution failed task ':app:transformclasseswithdexfordebug'. com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception: java.util.concurrent.executionexception: com.android.ide.common.process.processexception: error while executing java process main class com.android.dx.command.main arguments {--dex --num-threads=4 --multi-dex --main-dex-list c:\users\ratik\desktop\buildbox\volunteer\studio\app\build\intermediates\multi-dex\debug\maindexlist.txt --output c:\users\ratik\desktop\buildbox\volunteer\studio\app\build\intermediates\transforms\dex\debug\folders\1000\1f\main c:\users\ratik\desktop\buildbox\volunteer\studio\app\build\intermediates\transforms\jarmerging\debug\jars\1\1f\combined.jar}
there few more errors, apear sometimes, of them:
error: @ com.android.dx.cf.direct.classpathopener.processarchive(classpathopener.java:284)
error: @ com.android.dx.command.dexer.main.processfilebytes(main.java:723)
error: @ com.android.dx.cf.direct.directclassfile.parsetointerfacesifnecessary(directclassfile.java:388)
error:java.lang.outofmemoryerror: gc overhead limit exceeded
what tried:
in build.gradle
apply plugin: 'com.android.application' android { compilesdkversion 25 buildtoolsversion "25.0.2" defaultconfig { applicationid "com.biif.volunteer" minsdkversion 14 targetsdkversion 25 multidexenabled true ndk { modulename "player_shared" } } buildtypes { release { minifyenabled false shrinkresources false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt' } } sourcesets.main { jni.srcdirs = []// <-- disable automatic ndk-build call } } dependencies { compile ('com.google.android.gms:play-services:+'){exclude module: 'support-v4'} compile files('libs/dagger-1.2.2.jar') compile files('libs/javax.inject-1.jar') compile files('libs/nineoldandroids-2.4.0.jar') compile files('libs/support-v4-19.0.1.jar') compile ('com.android.support:multidex:1.0.1') }
in manifest
android:name="android.support.multidex.multidexapplication"
plus turned off instant run (saw in 1 thread here).
nothing helped :( ideas please? guys :)
i included gradle.properties file in project with:
org.gradle.jvmargs=-xmx10248m -xx:+heapdumponoutofmemoryerror -dfile.encoding=utf-8
and works.
Comments
Post a Comment