Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange error when trying to use the android v7 appcompat library

I have just included the android v7-appcompat library in my project.I have successfully added the jars to the build path and am now using the Theme.AppCompat theme.Now,I get this strange error:

[Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v7/app/ActionBar$Callback; [2013-10-09 11:11:50 - DelTest2] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v7/app/ActionBar$Callback;

EDIT

My project now contains three folders,each of which contains the android v7 appcompat:

+Android Private Libraries
+Android Dependencies
+Referenced Libraries

Which one of these libraries must I delete in order to make my project work?

like image 570
vamsiampolu Avatar asked Oct 09 '13 10:10

vamsiampolu


2 Answers

Its showing error that your project contains multiple android-support-v4.jar.

One which is actually in your project and another is in the library which you have added in your project. Just remove the one library which you have added in your project. And then clean and run your application.

That's it.

like image 151
GrIsHu Avatar answered Nov 17 '22 06:11

GrIsHu


First, I removed all the jars from the build path and then went on to add the jars from the android v7 appcompat library. This created a Reference Libraries folder in my project where these two libraries were referred to.

Also, I found that the theme that comes with the appcompat library is dark. Instead, I am using the AppCompat.Light theme.

like image 25
vamsiampolu Avatar answered Nov 17 '22 06:11

vamsiampolu