Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Joda Time resource not found error [duplicate]

I'm trying to take a String and convert it to another String in a more readable format:

String startTime = invite.get_start_time();
Log.d(LOG_TAG, "String to be converted is " + startTime);
DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
DateTime dt = fmt.parseDateTime(startTime);
invite.set_start_time(dt.toString("MM dd yyyy hh:mmaa"));

08-02 14:33:19.011: D/InvitesObjectListAdapter(856): String to be converted is 2015-08-03 10:30:00 08-02 14:33:19.041: W/System.err(856): java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap" ClassLoader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/me.lunchbunch.core-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]]

Anyone know where this error comes from?

like image 587
Brandon Avatar asked Aug 02 '15 18:08

Brandon


People also ask

What is the license for the Joda Time Library?

Joda-Time is licensed under the business-friendly Apache 2.0 licence. The list of FAQ s. Why Joda Time? The standard date and time classes prior to Java SE 8 are poor. By tackling this problem head-on, Joda-Time became the de facto standard date and time library for Java prior to Java SE 8.

How do I download and use Joda-Time?

To use Joda-Time you need to download the latest version. The download will contain the joda-time jar file. Once you add this to your classpath you will be able to use Joda-Time. The binary download also includes joda-time-sources.jar, which is a jar file of the source code suitable for linking to the jar file in IDEs such as Eclipse.

What is included in the binary download of Joda?

The binary download also includes joda-time-sources.jar, which is a jar file of the source code suitable for linking to the jar file in IDEs such as Eclipse. The release notes for upgraders can be found here:

Is Joda-convert a compile-time or runtime dependency?

There is a compile-time dependency on Joda-Convert, but this is not required at runtime thanks to the magic of annotations. Available in Maven Central. The 2.x product line will be supported using standard Java mechanisms.


1 Answers

Sorry for wasting peoples' times, @adelphus is correct - I did not initialize with:

JodaTimeAndroid.init(this);

It was in my code, but I need to refactor to ensure this is hit.

like image 145
Brandon Avatar answered Oct 16 '22 04:10

Brandon