android-multidex

android-support-multidex.jar not working in eclipse

≯℡__Kan透↙ 提交于 2019-12-06 11:15:54
问题 Recently I faced 65K method limitation issue in my android project. Then I started to implement multidex in that projects. When I try to add this support library in eclipse, the issue not resolved. Still it showing the 65K limitation. But when its working fine in Gradle+Android studio. How can i achieve this in eclipse? Because I don't want to switch to Android studio now. Here is the steps I have followed, 1) Added the android-support-multidex.jar into build path, 2) overrided, the below

Firebase API initialization failure,java.lang.reflect.InvocationTargetException

烂漫一生 提交于 2019-12-06 09:22:45
I am using firebase auth, database and storage services in my app. It was working fine previously. I have added firebase cloud messaging setup as described in docs. But app crashes at runtime.I investigated the issue for about 4 hours and tried different solutions. Like keeping all libs version same, changing appcompat library version and change app to multidex.But nothing helped. Below is my gradle dependencies: compile('com.digits.sdk.android:digits:2.0.6@aar') { transitive = true; } compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support.constraint:constraint-layout:1

Duplicate entry error when integrating appodeal

风流意气都作罢 提交于 2019-12-06 08:47:15
error: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v7/widget/StaggeredGridLayoutManager$SavedState$1.class Dependencies: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile project(':cheetah-mobile-3.4.7') compile 'com.android.support:multidex:1.0.1' compile('com.android.support:appcompat-v7:24.0.0') { force = true; } compile('com.android.support:design:24.0.0') { force = true; } compile 'com.google.firebase:firebase-ads:9.4.0'

Getting MultiDex Error, even after setting Min SDK 21

北城余情 提交于 2019-12-06 05:32:48
问题 The project i am working on has around 180k Methods. I have read blogs, and articles where its written that if you set your Min SDK to 21 , then you don't need MultiDex . But if i remove MultiDex from here it gives me the 65k MultiDex error message. Following is my gradle file. I don't know whether i failed to understand the concept or something else. Kindly guide me. compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId 'com.myapp.app' minSdkVersion 21

Stranger things in Android class resolution

本小妞迷上赌 提交于 2019-12-06 04:18:56
问题 I observe quite a few behaviors on Android (I am working on a multidex issue, so I use an emulator in 4.4.4) that leave me speechless about Android class loading: On Android classes are not supposed to be resolved when being loaded by the class loader. But if I create a class: public class M { public Foo m(String i) { switch (i) { case "0": return new Foo(); case "1": return new Foo2(); } return null; } } and debug my app, adding watches: getClass().getClassLoader().findLoadedClass("Foo")

Too many method references in android library project - ClassNotFoundException

梦想与她 提交于 2019-12-05 17:46:51
I have library project which I am using in main android project using AAR file. I am getting the famous 65k method limit now which I have expected, but I have few queries. I have added AAR file in libs folder of my main project and compiled the same in build.gradle. 1) Do I need to add multi-dex support in both library as well as main android project? 2) Do I need to add afterEvaluate script in both project? Most importantly if we got multi-dex working, we might get issue that in main android project we get Classnotfound exception if any of the class which we try to use is not in main dex list

Multidex installation failure

谁说胖子不能爱 提交于 2019-12-04 22:53:25
I'm using CircledImageView library. It works fine on lollipop+ android versions. But in kitkat it's crashing. So after searching on google. I found that i have to implement multidex in my app. So this my application class. public class FireApp extends Application { @Override public void onCreate() { super.onCreate(); Firebase.setAndroidContext(this); Fresco.initialize (this); } @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); } } And in build.gradle under defaultconfig MultiDexEnabled is true multiDexEnabled true But when I run

Android ProGuard +MultiDex causes ClassNotFoundException

二次信任 提交于 2019-12-04 21:10:10
问题 I have MultiDex enabled in my android project. It was working fine until I tried enabling proguard. I can successfully build the project but I get runtime exception on startup. It's unable to find the Application class and the MainActivity . I had the same problem before enabling MultiDex . Now I guess for some reason the MultiDex is not working properly with ProGuard . Here is what i get in the logcat - 02-17 19:01:09.749: I/MultiDex(2079): VM with version 2.1.0 has multidex support 02-17 19

java.lang.VerifyError with API < 21

蓝咒 提交于 2019-12-04 19:43:08
I'm using MultiDex in my app to support over 65k methods. Over api 21 it works well because it does a predex build. Under api 21 I have a crash in my Application with this stacktrace: java.lang.VerifyError: mypackage/com/myapp/MyAppApplication at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1215) at android.app.Instrumentation.newApplication(Instrumentation.java:990) at android.app.Instrumentation.newApplication(Instrumentation.java:975) at android.app.LoadedApk.makeApplication(LoadedApk.java:502) at android.app.ActivityThread.handleBindApplication

How to avoid DEX 64K LIMIT by importing the right library

戏子无情 提交于 2019-12-04 18:57:47
问题 I had this issue where I overflow the 64k method limit in Dalvik when compiling all the library I used. I started to have this issue when I imported the Support Library, as some are already contained in others, it ended up overflowing the limit. Is there a way to verify if a library is unused in the current project or already imported through another library dependencies? Currently, I'm excluding those I know for sure but it seems weird to have to do this by hand. dependencies { compile