Android unable to execute dex : multiple dex files define Landroid

Just today I started getting this exception:
[sourcecode language=”java”]unable to execute dex : multiple dex files define Landroid[/sourcecode]
Cause: This exception will come if you have multiple version of support library.

Where to check:

  1. Right Click on Project and select Build Path
  2. Check in Libraries if you have support library added (This happens when we do Android Tools -> Fix Project Properties)
  3. If you don’t find any such instance then check if you have copied support library manually into the lib folder of your project
  4. If you don’t find any such duplicates then check how many Android libraries (custom applications like FacebookSDK) 

Remove the duplicate libraries and do a clean -> rebuild

Hope this helps.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Discover more from Code Holic

Subscribe now to keep reading and get access to the full archive.

Continue reading