Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Socialize SDK: Unable to execute dex: Multiple dex files define

I'm using Socialize SDK in my Android app project (API 18).

I have read its Getting Started documentation and followed the instruction on how to implement it.

However, I come across several problems regarding library imports. I've tried to put all the JAR files inside my project's /libs folder but it couldn't locate the drawables, because clearly I haven't include their /res folder.

So, I configured the Build Path of my project to include the Libraries. Now this error shows up:

[2013-11-20 10:11:04 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

[2013-11-20 10:11:04 - WebShopper] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

I have already imported Socialize project folder into Eclipse in order to use its libraries. But I couldn't figure out how to solve this error.

Here is how my Build Path currently looks like, if it helps:

Java Build Path

What's wrong with it? Are there any duplicated libraries I have to remove here?

If anything, please let me know.

like image 834
emen Avatar asked Nov 20 '13 04:11

emen


2 Answers

I don't know exactly what is the problem, it may be because of same class definition in multiple jar files. I also had same problem once but resolved it by removing one jar file from my lib folder.

Here is some links which may help you out in coming out of this problem

Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;

Getting "Unable to execute dex: Multiple dex files define" error when trying to run main project which is using other library project

like image 109
Shashank Avatar answered Oct 18 '22 03:10

Shashank


This type of error occur because of multiple libraries or jar files in your project.Do the following:

  1. Delete the imported library first.
  2. Then clean your project.
  3. Go to project properties,then click on java build path, Library and then import jar.
  4. Then refresh your project and run again.

Hope this would help you..:)

like image 39
Pihu Avatar answered Oct 18 '22 03:10

Pihu