0

I have an Android project which uses the following library projects along with using the Android Support v4:

ActionBarSherlock
SlideMenuLib
Facebook
Google Play services

My project is working fine in eclipse and im able to launch the porject directly from the IDE but when I try to import and run the same project in IntelliJ (13.0.2), it gives me the following error

Android Dex: [Splash] com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

I know from the error that somehow IntelliJ is picking up the Supportv4 library multiple times from all the three places but any attempt to play around with the Support library imports, the project stops compiling saying com.android.support.v4 is missing in both Eclipse and Intellij.

Kshitij Aggarwal
  • 5,287
  • 5
  • 34
  • 41

2 Answers2

1

Fixed the problem. Thanks to the solution found here: Intellij: android-support-v4.jar in included in actionBarSherlock and Project => IllegalArgumentException

I changed the scope of the support library in ActionbarSherlock and SlideMenuLib to 'provided' and that did the trick.

Community
  • 1
  • 1
Kshitij Aggarwal
  • 5,287
  • 5
  • 34
  • 41
0

You have problems with your imports probably your project are using the same two libraries (older and new) and do not know with one should be used.

Check your Libs files, lib-project and references.

Try to: build path -> Order and Export, Uncheck the jar that is the same that the imported library uses.

Unii
  • 1,587
  • 15
  • 33
  • But the project is working fine in Eclipse. The changes that you are suggesting wont really help in compiling the project in Intellij. I have added some more details in my question to further clarify – Kshitij Aggarwal Mar 03 '14 at 10:00
  • Are you sure I had the same problem migrating project from eclipse to android studio there was a problem with support library. Library was added to main project and libs that I was using. Removing unused imports remove problem with dex – Unii Mar 03 '14 at 10:03
  • Could you please clarify on your initial answer, maybe I did not understood it properly. And add any detailed steps you followed for the migration, that would really help. :) – Kshitij Aggarwal Mar 03 '14 at 10:04
  • You have more than one support lib that you are using so it is a problem with an imports [dex]. – Unii Mar 03 '14 at 10:06