android-multidex

Robolectric unit tests fail after Multidex

橙三吉。 提交于 2019-12-02 21:41:12
So I recently merged my robolectric 3.0 upgrade with our mainline, which had added multidex support to our application. Unfortunately, this had the unfortunate side effect of causing our tests to fail/not run - they'd simply stop after the first failed attempt to install MultiDex, with this stack trace: java.lang.RuntimeException: java.lang.RuntimeException: Multi dex installation failed (/Users/me/Data/Projects/my-android/myapp/. (Is a directory)). at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:257) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java

Speed up gradle build in multidex application

吃可爱长大的小学妹 提交于 2019-12-02 14:55:43
My application has a bunch of librarys that are essential that is why I was forced to use multidex support library and it works nicely. But where the problem shows is in the gradle buid speed. It takes on average 2minutes to build and when I am developing and testing this is quite annoying. Is there a way to speed up my debug builds? Alex Lipov You can speed-up your development builds by specifying the minimum SDK version = 21. Official documentation includes a whole section about that. Example (from documentation): android { productFlavors { // Define separate dev and prod product flavors.

Unable to merge dex after adding dependencies

北战南征 提交于 2019-12-02 11:24:22
I am getting the error: Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForPaidFreeDebug'. java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex After adding the following two dependencies: implementation 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2' implementation 'com.prolificinteractive:material-calendarview:1.4.3' Here are all of my dependencies: dependencies { compile 'com.android.support:multidex:1.0.2' compile('com.github.florent37:materialviewpager:1.2.0@aar') { transitive = true } compile 'com.android

Android - MultiDex Install

烂漫一生 提交于 2019-12-02 06:51:45
I have exceeded the 65k method limit, by importing an external library. I have enabled ProGuard, but still get the same error. [2015-01-12 15:13:39 - Dex Loader] Unable to execute dex: method ID not in [0, 0xffff]: 65536 [2015-01-12 15:13:39 - MyFirstGame] Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536 After reading the official Google documentation, it seems I should configure a MultiDex support. I am building my project using the Eclipse Indigo IDE, and do not have a build.gradle file. Using the SDK Manager I have installed 'Android Support

Android : Apache POI duplicate entry: org/apache/xmlbeans/xml/stream/Location.class error

陌路散爱 提交于 2019-12-02 02:29:56
Hi I am getting following error while running my android project : Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/xmlbeans/xml/stream/Location.class I have searched about this issue on internet, differenet type of solutions provided few of them as below : 1] Enable multidex, (by doing `multiDexEnabled true`), 2] Remove support library v4 as v7 comes with it, (I am using only v7), 3] Increase jvm heap size through gradle or through gradle.properties, 2]

java.util.MissingResourceException: Can't find bundle for base name javax.servlet.LocalStrings

三世轮回 提交于 2019-12-01 22:39:25
I have an Android app that uses multidex. It is released and has monthly users in the hundreds of thousands. Every so often I will get ExceptionInInitializerError crashes on Crashlytics. I've never been able to reproduce them. I read that this can be due to multidex and that have multiDexKeepFile file('multidex-config.txt') on my config with a list of classes would help, but it doesn't seem to help, at least not for this resource. This is the content on my multidex-config.txt : org.eclipse.jetty.http.MimeTypes org.eclipse.jetty.server.Server javax.servlet.LocalStrings Those are all classes for

Getting 'app:transformClassesWithDexForDebug' error on compiling the project having useLibrary 'org.apache.http.legacy' in build.gradle

喜你入骨 提交于 2019-12-01 17:55:29
I'm developing an app in which I'm using this library . On compiling the project, this error containing TransformException and RuntimeException is popping up: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: Unable to pre-dex 'C:\Users\hp\.gradle\caches\modules-2\files-2.1\org.brunocvcunha.instagram4j\instagram4j\1.4\e86d0ec82fb3eb4225b983e6dc14db048005bc9b\instagram4j-1.4.jar' to 'C:\Users\hp\Downloads\Hamy\app\build\intermediates\transforms\dex\debug\folders

Android Multidex RuntimeException

醉酒当歌 提交于 2019-12-01 17:50:33
I am trying to solve a problem with running Android app that has over 65k methods. I have followed Google docs about Multidex support, however I'm still unable to run it successfully. It seems that the problem appears only on SDK less than 21, because when I specify minSdkVersion 21 , it works well, however once I set it to minSdkVersion 15 , I am getting following exception. FATAL EXCEPTION: main java.lang.RuntimeException: Unable to instantiate application custom.package.name.MyApplication: java.lang.ClassNotFoundException: Didn't find class "custom.package.name.MyApplication" on path:

Gradle DSL method not found : 'multiDexEnabled()'

自古美人都是妖i 提交于 2019-12-01 16:47:19
I followed the multidex guide at https://developer.android.com/tools/building/multidex.html But I get this error Gradle DSL method not found : 'multiDexEnabled()' . I have updated Android Built Tools , Android Support Repository and Library. Here is my gradle.build file. Am I doing something wrong here? Could not find method multiDexEnabled() for arguments [true] on ProductFlavorDsl_Decorated{name=main, minSdkVersion=ApiVersionImpl{mApiLevel=10, mCodename='null'}, targetSdkVersion=ApiVersionImpl{mApiLevel=17, mCodename='null'}, renderscriptTargetApi=-1, renderscriptSupportMode=null,

Android Multidex RuntimeException

自古美人都是妖i 提交于 2019-12-01 16:33:11
问题 I am trying to solve a problem with running Android app that has over 65k methods. I have followed Google docs about Multidex support, however I'm still unable to run it successfully. It seems that the problem appears only on SDK less than 21, because when I specify minSdkVersion 21 , it works well, however once I set it to minSdkVersion 15 , I am getting following exception. FATAL EXCEPTION: main java.lang.RuntimeException: Unable to instantiate application custom.package.name.MyApplication: