Sourabh
Sourabh

Reputation: 101

Could not find class 'org.joda.time.DateTime', referenced from method ##

Facing this issue since yesterday , searched a lot but didn't found any solution , can anybody help?

Getting following error:

Could not find class 'org.joda.time.DateTime', referenced from method com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder.

Log:

Could not find class 'org.joda.time.DateTime', referenced from method com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder.<clinit>
06-01 11:10:16.521 8973-8973/org.hispindia.bidtrackerreports E/AndroidRuntime: FATAL EXCEPTION: main
                                                                               java.lang.RuntimeException: Unable to create application org.hispindia.bidtrackerreports.HIApplication: java.lang.RuntimeException: 

Upvotes: 2

Views: 3562

Answers (2)

goemic
goemic

Reputation: 1339

I had multidex enabled in my .gradle, to resolve this issue I extended my Application with MultiDexApplication:

public class Application extends MultiDexApplication 

For more information refer to the developer guide: https://developer.android.com/reference/android/support/multidex/MultiDexApplication.html

Upvotes: 0

Krutik
Krutik

Reputation: 732

If you are using Android studio you can add

compile 'joda-time:joda-time:2.3'

or you can add joda-time-2.3.jar into lib folder.

In the file picker, just select the joda-time-2.3-sources.jar file. And you're done and add the line

compile files('libs/joda-time-2.3.jar')

Upvotes: 1

Related Questions