Vivek Pradhan
Vivek Pradhan

Reputation: 4847

noclassdeffounderror net.fortuna.ical4j.data.CalendarBuilder

I am using ical4j to read an ical file. I am using the android adt with eclipse. I downloaded the latest binaries(.zipped) version 1.0.4 from their site. It had all the dependencies (executable jar files) in the libs folder. The jar files were added to the class paths successfully and eclipse was giving suggestions and code completions which i guess suggests that the imports were successful.

However when i run the project, I get an error that the class "net.fortuna.ical4j.data.CalendarBuilder" could not be found and the program terminates. I have not debugged other run-time errors if any but I have not been able to solve this. I looked up the folder that i got when i extracted the downloaded zip file and the calendarbuilder class was packaged with the jar file it seems. Why do I get this error message in logcat then?

Upvotes: 0

Views: 980

Answers (1)

Vivek Pradhan
Vivek Pradhan

Reputation: 4847

I have seen people with similar questions on this forum. I tried importing the files for a normal java project and it works like a charm. The thing is the Dalvik JVM which is the heart of an Android System does not recognize import of external jars if we just reference it. I found a solution here.

This works perfectly, however if you are runnig ical4j, we do not have to include all the jars in the lib folder. We only require the compile time dependencies otherwise the eclipse workspace will freeze and your device or AVD won't show up the app with a log error saying "GC overhead limit exceeded." Hope this helps somebody.

Upvotes: 2

Related Questions