android-multidex

Android Multidex and support libraries

元气小坏坏 提交于 2019-11-27 19:01:18
问题 I am getting issue with when i enable multidex. I am using Android studio, i am getting "Could not find class" on DrawerLayoutWidget. Here is the setup build.gradle apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion '21.1.0' defaultConfig { applicationId 'com.myapp' minSdkVersion 14 targetSdkVersion 21 multiDexEnabled true } } dependencies { compile 'com.android.support:appcompat-v7:21.+' compile 'com.android.support:support-v4:21.+' } activity_main.xml

Android MultiDex - Questions on Inner Workings

帅比萌擦擦* 提交于 2019-11-27 18:05:22
问题 I recently discovered the new MultiDex functionality from Android for working with apps having more than 65,000 references. See: https://developer.android.com/tools/building/multidex.html Can someone help me understand the following questions: 1) How does the Gradle build plugin determine what to put in the primary dex file (classes.dex) vs the secondary dex files? Based on the doc there are certain things required to be in primary dex but it doesn't give any examples. Are all activities

Android studio java.lang.NoClassDefFoundError: android.support.v4.app.NavUtilsJB

寵の児 提交于 2019-11-27 14:51:25
问题 This is my error log acheived with android studio 1.0.2 02-03 13:05:23.831 8385-8385/com.******.*******E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.NoClassDefFoundError: android.support.v4.app.NavUtilsJB at android.support.v4.app.NavUtils$NavUtilsImplJB.getParentActivityName(NavUtils .java:125) at android.support.v4.app.NavUtils.getParentActivityName(NavUtils.java:302) at android.support.v4.app.NavUtils.getParentActivityName(NavUtils.java:281) at android.support.v7.app

Android - transform Classes With Dex For Debug

。_饼干妹妹 提交于 2019-11-27 09:01:31
My project was working fine until I added the Facebook dependency. I've started getting this error. I've read many question, the problem seems to be related to MultiDex . But none of the solutions worked for me Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 1 Even after I remove what I've added, it still show and also gradle seems

NoClassDefFoundError below SDK 21

可紊 提交于 2019-11-27 07:06:58
I just experienced an awkward bug in my App. On my Nexus 5/7, running android 5.0.1/5.0.2, everything works just fine. However if i try running the exact same code on a device with an earlier version (tested 4.4.4 and 4.3) I get the following error: 03-13 13:49:41.140 21714-21714/? E/dalvikvm﹕ Could not find class 'com.default.package.application.model.Appcomponent', referenced from method com.default.package.application.controller.DatabaseHandler.getScreenComponents 03-13 13:49:41.140 21714-21714/? E/dalvikvm﹕ Could not find class 'android.support.v7.app.ActionBarActivityDelegate$1',

Is there a way to limit method amount in main dex file while using MultiDex feature in Android Studio

北慕城南 提交于 2019-11-27 03:31:36
问题 When I enabled MultiDex feature in Android Studio like the document says, it automatically spilted into two or more dex files. I cannot config it. And it seems that in the main dex file, the amount of methods is very close to the limitation(65536). The question is how to config it, make the amount of methods in the main dex file reduce to a certain number, say 60k. I have to upload the apk to amazon appstore, and the people of amazon will add a few methods into the main dex file and make it

What is Android MultiDex?

与世无争的帅哥 提交于 2019-11-27 03:21:39
There are many posts about MultiDex. I have experienced, sometimes, errors solved including multiDexEnabled true in the defaultConfig section of my build.gradle. But, what exactly is this feature? What are the scenarios for using it? Quoting the documentation : Android application (APK) files contain executable bytecode files in the form of Dalvik Executable (DEX) files, which contain the compiled code used to run your app. The Dalvik Executable specification limits the total number of methods that can be referenced within a single DEX file to 65,536, including Android framework methods,

gradle - Android Studio build too slow multidex application

点点圈 提交于 2019-11-27 02:33:58
问题 When I add to my project the multidex:true, and make an Application class that extends from the MultiDexApplication, my project build time passed from 20 sec to around 90 sec.How to do some faster? 回答1: If you are like me who already tried Vic Vu's solution but still can't avoid enabling multiDex then you can try this (as long as your are using a device that has Android 5.0 and above). Note This will only speed up your development build. Your production build will still be slow. Basically you

Didn't find class “android.support.multidex.MultiDexApplication” on path: DexPathList

给你一囗甜甜゛ 提交于 2019-11-27 02:29:09
问题 I'm trying the new MultiDex Support on my app and so far I've managed to compile my app correctly, but when running it, I get the following exception: java.lang.RuntimeException: Unable to instantiate application android.support.multidex.MultiDexApplication: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication" on path: DexPathList[[zip file "/data/app/me.myapp.main-2.apk"],nativeLibraryDirectories=[/data/app-lib/me..main-2, /vendor/lib, /system

Enable `--multi-dex` option in ant for Android

☆樱花仙子☆ 提交于 2019-11-27 01:55:00
问题 It's easy to enable multi-dex option for gradle build system, but I haven't found example how I can enable this option for ant building. How can archive this? 回答1: We have 2 options: Change DexExecTask [introduce new parameter for multi dex], compile ant.jar, use this jar for building. I don't like this option, coz we have to provide updated ant.jar for all team members. Modify project build.xml file. I have found awesome ant build file, that has all modifications for support multi-dex: https