Monday 1 January 2018

android-support-multidex.jar not working in eclipse

itemprop="text">

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 method
in Application class. Since I am subclassing custom Application class.



@Override
protected
void attachBaseContext(Context base) {
// TODO Auto-generated method
stub
super.attachBaseContext(base);


MultiDex.install(this);
}


But
I can't able to achieve this in eclipse. Any solution for this?



Answer




Possible duplicate href="https://stackoverflow.com/questions/26530654/android-multidex-support-library-using-eclipse">here.
Answer from Alex Lipov:





It looks like ADT's href="https://android.googlesource.com/platform/tools/base/+/master/legacy/ant-tasks/"
rel="nofollow noreferrer">ant-tasks project is no longer maintained
(it

resides under 'legacy' folder). So if you can't migrate to
Gradle,
you can edit the href="https://android.googlesource.com/platform/tools/base/+/master/legacy/ant-tasks/src/main/java/com/android/ant/DexExecTask.java"
rel="nofollow noreferrer">DexExecTask manually. You'll have of course
to
rebuild the project locally..




[Edit - 10/25/2014] maven-android-plugin href="https://code.google.com/p/maven-android-plugin/wiki/Changelog" rel="nofollow
noreferrer">does support multi-dex. However, it currently has a small
issue: secondary dex
files placed in wrong location. This href="https://github.com/jayway/maven-android-plugin/pull/482" rel="nofollow
noreferrer">pull request strives to fix
that, so stay
tuned!



No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...