1

I am writing an android application using eclipse and am trying to use jar files I generated from another eclipse (not android) project I wrote. However, when I try to run my android application, I get the following error message:

[2014-05-15 18:42:25 - ResearchNotebook] Dx 1 error; aborting

[2014-05-15 18:42:25 - ResearchNotebook] Conversion to Dalvik format failed with error 1

which is preceeded by a longer error message.

I looked at the following question (Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library), and but am not sure how I would reconfigure the eclipse IDE so that rt.jar and android.jar are not being passed to dx.

However, I wrote non android java code within the same project using the jar and ran it in the console. It worked perfectly fine. The problem only arises when I try to use the jar for the classes pertaining to the android application.

At this point, I have tried many different alternatives, including cleaning the project, deleting the jars from the buildpath and adding them again, and changing order and export according to the following site: http://tools.android.com/recent/dealingwithdependenciesinandroidprojects.

Is there something else I should have done when generating the jar from my eclipse (non android) project? I have really hit a wall this problem and am at a loss about how to proceed.

Community
  • 1
  • 1
  • Is one of the jars you are using android.support.v4.app? There is most likely a repeat or overlap in these files. Try clearing the support library from the project and add a new one. – Ethan Thomas May 16 '14 at 03:19

1 Answers1

0

Try the following:

  1. Uncheck "Build Automatically" from the "Project" menu.
  2. Do a project cleanup.
  3. Export your project

Hope it helps.

Junior Buckeridge
  • 2,075
  • 2
  • 21
  • 27
  • I've tried doing this, and my project still stops unexpectedly =/ – user3642948 May 16 '14 at 02:48
  • Are you using ProGuard? If so, you should try using the **-keep** options. Check also http://stackoverflow.com/questions/2680827/conversion-to-dalvik-format-failed-with-error-1-on-external-jar?rq=1 – Junior Buckeridge May 16 '14 at 16:18