So I’m trying to import a project into Eclipse. I needs some libraries, I import them, no problem. Then I import the project itself, make the reference to the libraries.
Eclipse then says:
The declared package "de.xy.ui" does not match the expected package "main.java.de.xy.ui"
I resolve this by removing the src folder from the build path (at least I think it’s resolved), Eclipse doesnt show any more problems.
I try to run the project and get:
[2013-02-12 14:06:18 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/app/_ActionBarSherlockTrojanHorse$OnCreateOptionsMenuListener;
[2013-02-12 14:06:18 - MainActivity] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v4/app/_ActionBarSherlockTrojanHorse$OnCreateOptionsMenuListener;
I think it’s because I have those libraries referenced in the project AND in the /gen folder of the project. When i delete the /gen folder it’s created again when I try to run the project. The gen folder is also in the build path of the project, but removing it from there results in the same (it’s added again).
What can I do?
The reason for Conversion to dalvik format failed here is that you have somehow included android-support-v4.jar more than once in your project.
Try to eliminate one copy or provide the screen shot of your Android Dependencies and libs folder.