多DEX文件 - 转换到的Dalvik格式失败 - 无法执行DEX [英] Multiple dex files - Conversion to Dalvik format failed - Unable to execute dex

查看:192
本文介绍了多DEX文件 - 转换到的Dalvik格式失败 - 无法执行DEX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个应用程序版本 - 亲和精简版。它们都已经在市场上,在1.01。我想发布V1.1两种。此更新包括以利用其全球排行榜SwawrmConnect一体化。

I have 2 app versions - pro and lite. They are both already on the market at v1.01. I am trying to release v1.1 for both. This update includes SwawrmConnect integration in order to use their global leaderboards.

我应该说我知道我不能正确地维护我的code开始。我有2个完全独立的应用程序,这一比例大概90%的code。我维护他们分开,因为一周后或2或3未能找出如何做一个图书馆和每股code,我放弃了,只是去这样吧。

I should start off by saying I know I am not maintaining my code correctly. I have 2 completely separate apps and that share probably 90% of their code. I maintain them separately because after a week or 2 or 3 of failing to figure out how to do a library and share code, I gave up and just went this way with it.

SwarmConnect是第一个罐子我已经使用,不得不做出一个库两个应用程序(见下面的文件结构的屏幕截图)。

SwarmConnect is the first jar I have used and had to make a library to two apps (see screenshot of file structure below).

现在我的精简版的版本是工作,准备好发布。我现在试图让我的专业版到它需要释放。我相当肯定所有Java / XML文件是最新的,并且准备好了。当我去运行Pro版本在模拟器中,我得到了以下错误:

Right now my lite version is working and is ready for release. I am now trying to get my pro version to where it needs to be for release. I am fairly certain all java/xml files are up to date and ready. When I went to run the pro version in the emulator, I get the below error:

[2013-04-18 11:24:41 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/swarmconnect/loopj/android/http/AsyncHttpResponseHandler;
[2013-04-18 11:24:41 - BibleTriviaPro] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/swarmconnect/loopj/android/http/AsyncHttpResponseHandler;

我试过

东西:

Things I've tried:

  • 清洁/重建
  • 更新的Eclipse
  • 删除bin和根文件夹
  • 重启Eclipse
  • 在加上一些其他的东西

我的文件结构:

莫非这个问题会是我试图用SwarmConnect为2个项目(精简版和Pro)?

Could the problem be is I am trying to use SwarmConnect as a library for 2 projects (lite and pro)?

编辑:

下面是文件结构是工作完美精简版的版本。编译和运行的模拟器。

Below is the file structure for the lite version that is working perfectly. Compiles and runs on emulator.

推荐答案

巧合的是我前天遇到了同样的问题,只是一天。下面是我建议你做的事。

Coincidentally I ran into the same issue just day before yesterday. Here's what I suggest you to do.

首先,确保你有所有的罐子$ P $备份psently居住在Android的依赖关系/库文件夹中。

First and foremost make sure that you have a backup of all the jars presently residing in the 'Android Dependencies'/'libs' folder.

现在,让我们通过以下步骤首先修复精简版的版本。

Now, lets fix the lite version first by following these steps.

  1. 删除所有除了文件 Android的支持 - v4.jar 从Android的依赖关系在项目资源管理器在Eclipse中的文件夹。

  1. Remove all jar files except android-support-v4.jar from the 'Android Dependencies' folder under Project Explorer in Eclipse.

同样删除除所有jar文件的android支持-v4.jar 文件夹下项目资源管理器在Eclipse。

Similarly remove all Jar files except android-support-v4.jar from the libs folder under Project Explorer in Eclipse.

现在右键点击你的项目 - >选择属性 - >选择Java Build Path->选择添加外部JAR。将所有必要的文件(只是确保你添加特定文件只一次)。

Now Right click on your project-> Select Properties-> Select Java Build Path-> Select Add External JARs. Add all the necessary jar files (just make sure you add a particular jar file only once).

最后清理项目,并构建它。现在申请相同的步骤顺序的专业版。 这应该做到这一点。

Finally clean the project and build it. Now apply the same sequence of steps to the pro version. That should do it.

更新: - 如果你看到Eclipse的恶癖一些编译时错误后做这一切的一切,你可能需要做的是刚修好做必要的进口pressing <大骨节病>控制<那些编译时错误/骨节病> + <大骨节病>移 + <大骨节病> 0

UPDATE:- In case you see Eclipse cribbing about some compile time errors after doing all this all you might have to do is to just fix those compile time errors by doing the necessary imports by pressing Ctrl+Shift+O.

[我假设有一个在源的依赖等方面项目的Pro和精简版版本之间没有任何联系......我的意思基本上可以说,他们是完全独立的。]

[I assume that there's no linkage between the pro and lite versions of the project in terms of source dependencies etc.. what I mean to say basically they are totally independent.]

希望这有助于。

这篇关于多DEX文件 - 转换到的Dalvik格式失败 - 无法执行DEX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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