Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having trouble getting Joda-time to run on Android.

I'm learning Android and have need for dates/times. I was recommended Joda-time by a colleague, which seems to be exactly what I need to make progress. Unfortunately, I'm having trouble getting it to work.

I'm using intellij and this is Android 2.2.

Steps I took:

  1. Download the Joda-time jar from the website.
  2. Intellij > File > Project Structure > Attach Classes
  3. Build

I then get this error:

warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.)

I have no idea where to go from here. Help would be appreciated!

like image 239
Allyn Avatar asked Sep 13 '10 19:09

Allyn


2 Answers

I believe you can safely ignore those warning. I get those in my included library but it works as expected.

like image 126
Miguel Morales Avatar answered Nov 11 '22 20:11

Miguel Morales


If you're not using reflection on the Joda-Time classes, you can ignore the error. You can fix the problem by building the Joda-Time sourcecode with a Java 1.5 compiler.

like image 30
Jesse Wilson Avatar answered Nov 11 '22 18:11

Jesse Wilson