0
votes

I want to export my compound view as a library for reusing. I do it as follow:
Right Click on project> Properties > Android > And check Is Library

And copy exported jar file to a new project and add it to the library, Now when I want to run my project eclipes throws an error:

[2014-10-11 11:31:18 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v7/appcompat/R$anim; [2014-10-11 11:31:18 - khonemojaradi] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v7/appcompat/R$anim;

According to error I know that I have same libraries that are there in my compound view and new project, But how can I fix it? I've done searches on stackoverflow and Google but I could not solve my problem

Thanks in advance

1

1 Answers

1
votes

You should do two things:

  1. Change the package route for your component because you may are having a conflict with other component of AppCompat 7
  2. Don't copy the jar. Import your project as a Android Project. It is: in the target project, where you want to use your component, add your library project from:

    Right Click on project> Properties > Android > Add project (below Check project as Library, that should be unchecked).

If you have imported your library project, it should appear there.

Good luck buddy!