Shared publicly  - 
 
Spent a few hours trying to figure out a Proguard problem with Joda Time when exporting an Android application package.

My project includes joda-time-2.0.jar, builds fine in Eclipse, and runs on an attached Android device. However, when I tried exporting the project as an unsigned application package, I encountered a list of errors of the form: "[proguard] Warning: org.joda.time.LocalDateTime: can't find referenced class org.joda.convert.FromString" and then suggestions like "[proguard] You may need to specify additional library jars (using '-libraryjars')".

What is actually happening is that the missing "FromString" class is an annotation that is not actually present as a class file in joda-time-2.0.jar. There's a claim (http://www.scala-lang.org/node/10575) that a missing annotation class file is not supposed to affect compilation, which sounds correct, but I don't know where this is formally stated.

Anyway, blame aside, the fix is to download and include joda-convert (http://joda-convert.sourceforge.net/) in the project's build path.
19
4
Chris Leung's profile photoIan Kavanagh's profile photoMarcin Jedynak's profile photoJurgis Kirsakmens's profile photo
13 comments
 
Thanks, spent a couple of hours trying to understand what's wrong and looking for solution. Build successfull :)
 
Awesome. Had the same issue. Cut out about a hundred proguard errors. 
 
Fantastic, this helped me so much. I was spending a lot of time trying to fix the issue. Should have googled it earlier.
 
Thank you, your hint really helped me a lot :) Although I don't understand why my other two projects worked flawlessly without this extra library :/
 
Thanks you, I just face same problem and your suggestion saved me hours. 
 
Thanks a mil, just had this issue.
 
Thanks for your hint which may have saved me hours of debugging time.
 
Thanks a lot, your fix saved my time too.
Add a comment...