I have an android app, which calls an jar lib say b.jar. This b.jar lib. is then calls facebook sdk lib. When I compile my app under this situation, it always says
Unable to execute dex: Multiple dex files define Lcom/facebook/android/AsyncFacebookRunner$1; Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/facebook/android/AsyncFacebookRunner$1;
I have used a few days to make it work, however, I failed to tackle this issue. Do anyone know how to solve this issue?
Go to the project properties and then Java build path -> Libraries -> Remove Android dependencies and OK then Run your project
Referred from : https://stackoverflow.com/a/15247670/1585773
Worked perfectly for me .
All answers are a work around. They do not solve the root cause of the issue. If you look at your project structure, there is a FacebookSDK project and your Project. In both the project, you have com.facebook.android(first java file being AsyncFacebookRunner) package, which have the same java files included. Obviously multiple dex files will define your class files and you will get error.
Solution - Remove the com.facebook.android from you main project (not FacebookSDK).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With