Possible Duplicate:
“Conversion to Dalvik format failed with error 1” on external JAR
long long time searcher on the site, for several years. Finally I'm stumped and need the help of this forum.
I have a GPS related app that I'm trying now to split into multiple versions for free/paid and also for re-branding purposes. Every attempt to split the project into a library and main has failed with Dalvik error 1. My desire is to have 95% of code in the library which would allow me to easily create rebranded versions and paid/free versions.
I've looked at the tic-tac-toe examples and read many blogs and articles on how to create library projects. So far about 20 hours searching and trying.
Here's my setup
- XP Pro SP3 with Eclipse Helios Service Release 2 (Build id: 20110218-0911 if it matters)
- Android SDK tools rev 20.0.3, platform tools rev 14
- (Also have tried Windows 7 with Helios, same problem)
- developing for api 7 (family still has older Androids :( )
- using com.google.android.maps
- proguard is disabled
- library is designated through Android project properties only, and added to the main project using the same project properties interface.
My project uses both asynctask subclasses and httpclient if it matters.
Debug build onto my actual device (HTC Desire Z, android 2.3.3) builds fine. actual apk build fails with dalvik error 1. Emulator build works fine as well.
I've read all the Dalvik stuff for tools release 14/15 but since I'm on 20 I hope it's been fixed by now!!
I've tried many different ways and each one has failed with the Dalvik error, including
creating new library and main projects in Eclipse, copying classes and res one by one into the new library project (and deleting what I'm pretty sure are unnecessary imports). Changed manifest references to be the library for classes and activities.
calling the original project a library and referencing it in a new main project with updated manifest to the library project
leaving the original project as is, but moving a single "strings.xml" file into the values folder (figured this one should work, especially since nothing should change in the manifest??)
Always the apk build fails while the debug build on my device works.
What other information can I provide to help with trouble shooting? I'm a total rookie when it comes to reading the error logs... my eyes gloss over.
Thanks in advance for what is probably a very rookie mistake...!