3

I'm having this problem since I installed the new SDKs. I've read about this happening when I try to link the same class to the build twice.

But here is the peculiar thing about it:

  1. I have an Android library project that includes a class folder on the build path.
  2. I have this library project included in one of my regular Android projects.
  3. I have to include the class folder in this regular project as well to make it build.

This when the error occurs. But when I do either of the following:

  1. Remove the class folder from the library project: The library project won't build, so the regular project won't either.
  2. Remove the class folder from the regular project: The library project builds, but the regular project won't because it misses the class files (?!).

I seem to be stuck in some unsolvable paradigm here. Maybe there are build rules to circumvent this?

Any help would be greatly appreciated!

whitebrow
  • 2,015
  • 21
  • 24
  • Duplicate of http://stackoverflow.com/questions/2680827/conversion-to-dalvik-format-failed-with-error-1-on-external-jar ?? – THelper Oct 24 '11 at 13:11
  • You have to rename the class in the library to avoid the conflict with the Android library – Reno Oct 24 '11 at 13:35

1 Answers1

6

Apparently the way Android library projects are linked has changed.

Before, the library's source folder would be linked to the build path. With the new solution the library is apparently built to a jar file in its own 'bin' folder.

This is then linked as an external jar to the build path of the project using the library.

To make the conflict dissappear, do two things:

  1. Remove the source folder link in Project properties->Java Build Path->Source
  2. Clean the project. Perhaps clear your projects 'bin' folder manually.

Now it should work again! :)

whitebrow
  • 2,015
  • 21
  • 24