Android – Adding a Android Library from a project into the workspace generate a Android Dependencies.Eclipse

androideclipsejar

When I select the properties to my project then go to Android and add a new Library, the eclipse automatically create a Android Depencies that contains all my .jars.

It does not add the new project to the list of referenced packages. When I try to Run the application I got the error: Conversion to Dalvik format failed with error 1. When i realize I have the .jars that i added both in the Android Dependencies and my /gen.

When I delete de Android Depencies I got error in my classes, saying that i´m not referencing the specifics .jar… But I have them in my /gen past.

Any Ideia how to make the eclipse refer to just one .jar?

Best Solution

Library is a special android feature that allows you to use an apk or another android project where you would for example share some code. It's detailed here :

http://developer.android.com/guide/developing/projects/projects-eclipse.html

I think that what you want to achieve is just adding a jar as a dependency which can be done with Project > Properties > Java Build Path > Libraries Tabs > Add Jars / Add External Jars.

tl;dr :

Project > Properties > Java Build Path > Libraries != Project > Properties > Android > Library