androidandroid-studiodx

Android Studio: dx.bat failed


I am using Android Studio for building an application, in which I am using Facebook-SDK and Actionbar Sherlock as a dependencies. Each project library contains android-support-v4.jar.

When I am trying with any one of the project library it is working well. But I'm facing problems when trying to implement both simultaneously.

I know that I am facing the problem due to android-support-v4.jar.

I want to know how to add android-support-v4.jar in an efficient way.

\Android\android-studio\sdk\build-tools\android-4.2.2\dx.bat failed

Solution

  • I just solved the similar problem. On my case and most probably on your case also, the problem is on adding android-support-v4.jar for multiple times. I then remove the dependencies of android-support-v4.jar from my project's build.gradle and just have a single dependencies on facebook build.gradle, as facebook sdk was first to build on my project.