android-support-multidex.jar在eclipse中不工作 [英] android-support-multidex.jar not working in eclipse

查看:494
本文介绍了android-support-multidex.jar在eclipse中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我在Android项目中遇到了65K的方法限制问题。然后,我开始在这个项目中实施multidex。新新200新新旗新新新旗新新旗新新旗新新旗新新旗新新旗旗新新旗新新旗新新旗旗新新旗新新旗旗新新旗新新旗新新旗旗规200醒醒200旗新新200仍然显示65K的限制。但是当它在Gradle + Android工作室中工作良好时。如何在日食中实现?因为我现在不想切换到Android studio。



这是我遵循的步骤,



1)将android-support-multidex.jar添加到构建路径中,
2)覆盖,Application类中的以下方法。因为我是自定义应用程序类的子类。

  @Override 
protected void attachBaseContext(Context base){
// TODO自动生成的方法存根
super.attachBaseContext(base);
MultiDex.install(this);
}

但是我无法在eclipse中实现这一点。任何解决方案?

解决方案

可能的重复此处。 Alex Lipov的答案:


看起来像ADT的 ant-tasks项目不再维护(
驻留在legacy文件夹下)。所以如果你不能迁移到Gradle,
你可以编辑 DexExecTask 。您当然可以
在本地重建项目。



maven- android-plugin 确实支持多指标。新新200新200新新新新旗新新旗新新旗新新旗新新200新新旗新新旗新新旗新新旗新200新新旗新新旗新200新新旗新新200新新旗新新200新新旗新新200新新旗新新200新新旗新新200新新新200新新200新新200新新200新新200新新200新新200新新200新这个拉请求努力修复
,所以留下新新新旗新新新新旗新新旗新新旗旗新1992新新新旗新新旗新新旗旗新新旗新旗旗新新旗新旗新旗新旗新

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?

解决方案

Possible duplicate here. Answer from Alex Lipov:

It looks like ADT's ant-tasks project is no longer maintained (it resides under 'legacy' folder). So if you can't migrate to Gradle, you can edit the DexExecTask manually. You'll have of course to rebuild the project locally..

[Edit - 10/25/2014] maven-android-plugin does support multi-dex. However, it currently has a small issue: secondary dex files placed in wrong location. This pull request strives to fix that, so stay tuned!

这篇关于android-support-multidex.jar在eclipse中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆