2

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
Ben
  • 51,770
  • 36
  • 127
  • 149
vinay kumar
  • 1,451
  • 13
  • 33
  • I am experiencing the same problem.. I have only ABS library but still facing this problem. Please help someone – Basant Singh Jun 25 '13 at 16:37
  • @basant_androidBuilder: please reffer http://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-the-android-studio. clear explanation for adding project libraries in android studio – vinay kumar Jun 26 '13 at 05:32

2 Answers2

2

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.

Shad
  • 1,587
  • 2
  • 20
  • 29
1

I faced this problem yesterday. I got it to work by making sure that there is the same android-support-v4.jar file in all libs directories throughout the project. The facebook-sdk and ABS ship with versions that might not be current when compared to the one that is installed by default by Android Studio. Let me know if it works.

If you need help integrating libraries in Android Studio, I recommend looking at facebook-sdk's step by step tutorial. I am sure once you integrate facebook-sdk you can use those steps to add any other library that you need by making small changes (i.e. use the name of the library you are trying to add instead of facebooksdk on the settings.gradle and build.gradle)

Emmanuel
  • 13,083
  • 4
  • 39
  • 53
  • Thank you for your support to resolve this issue. As I said in my question it is working good when I am using single library-project, I am facing this when adding multiple library-project which internally contains individual "android-support-v4.jar". Is any way doing the same? – vinay kumar Jun 26 '13 at 05:43