在Android中启用MultiDex支持,以在Eclipse中实现65K +方法 [英] Enabling MultiDex Support in Android to achieve 65K+ methods in Eclipse
问题描述
我尝试以下步骤,在Android应用程序中配置Multidex支持:
- 我已将Multidex库添加到/ extras / android / support / multidex /到我的项目。
- 因为我的应用程序有自定义应用程序类,我已经将android.support.multidex.MultiDexApplication类扩展到我的应用程序。
仍然是无法建立apk。
Android开发人员还没有关于在eclipse中构建Multidex apk的任何文档,它仅具有毕业生和Android Studio的文档。
您必须修改build.gradle以在buildconfig,buildType或productFlavour部分添加multiDexEnabled true
defaultConfig {
//支持库返回作为Android-14,并不需要21+
minSdkVersion 14
//启用多重支持。
multiDexEnabled true
}
如果你建立在旧的Ant上,是一个阻塞的问题,所以你必须移动到gradle或maven或使用旧的繁琐的解决方案
http://android-developers.blogspot.com.es/2011/07/custom-class-loading-in-dalvik。 html
I am trying to build Multidex apk in eclipse, and not able to succeed.
I tried following steps, for configuring Multidex support in android app:
- I have added the Multidex library located at /extras/android/support/multidex/ to my project.
- As my app is having custom application class, I have extended android.support.multidex.MultiDexApplication Class to my application.
Still i am not able to build apk.
Android developer is also not having any documentation for building Multidex apk in eclipse, its only having documentation for gradle and Android Studio.
You have to modify build.gradle to add multiDexEnabled true under buildconfig, buildType or productFlavour sections
defaultConfig {
// The support library goes as back as Android-14, and is not required for 21+
minSdkVersion 14
// Enabling multidex support.
multiDexEnabled true
}
If you're building on old Ant, this is a blocking problem so you'll have to move to gradle or maven or use the old cumbersome solution
http://android-developers.blogspot.com.es/2011/07/custom-class-loading-in-dalvik.html
这篇关于在Android中启用MultiDex支持,以在Eclipse中实现65K +方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!