title: android dalvik error 1 with library project
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2680827/conversion-to-dalvik-format-failed-with-error-1-on-external-jar">“Conversion to Dalvik format failed with error 1” on external JAR</a>  </p>
  </blockquote>
  
  
  
  <p>long long time searcher on the site, for several years. Finally I'm stumped and need the help of this forum.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Here's my setup</p>
  
  <ul>
  <li>XP Pro SP3 with Eclipse Helios Service Release 2 (Build id: 20110218-0911 if it matters)</li>
  <li>Android SDK tools rev 20.0.3, platform tools rev 14</li>
  <li>(Also have tried Windows 7 with Helios, same problem)</li>
  <li>developing for api 7 (family still has older Androids :( )</li>
  <li>using com.google.android.maps</li>
  <li>proguard is disabled</li>
  <li>library is designated through Android project properties only, and added to the main project using the same project properties interface.</li>
  </ul>
  
  <p>My project uses both asynctask subclasses and httpclient if it matters.</p>
  
  <p>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.</p>
  
  <p>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!!</p>
  
  <p>I've tried many different ways and each one has failed with the Dalvik error, including</p>
  
  <ul>
  <li><p>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.</p></li>
  <li><p>calling the original project a library and referencing it in a new main project with updated manifest to the library project</p></li>
  <li><p>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??)</p></li>
  </ul>
  
  <p>Always the apk build fails while the debug build on my device works.</p>
  
  <p>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.</p>
  
  <p>Thanks in advance for what is probably a very rookie mistake...!</p>