Friday 21 August 2015

Conversion to Dalvik format failed with error 1 in Android

When you are in the process of learning android development, you will encounter many issues on the way.

One such issue which i have encountered recently is the below error 


Dx 1 error; aborting
Conversion to Dalvik format failed with error 1

 
If you use the eclipse IDE, you will get a error message a portion that message is as below:

This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as
Eclipse). If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
going on.

So, how to solve it?

Here it is.

1) Go to Project--> properties-->Java Build Path
2) Select Order and Export tab
3) Deselect the Android Private Libraries and Android Dependencies and click ok





 After doing the above steps, relaunch the application. 

 This time you should be happy seeing your application up and running :)