androideclipseproperties-fileical4j

Where should I put the ical4j.properties file in an Eclipse Android project?


I have an Eclipse Android project that works alright on its own.

I have included an external library called ical4j (I've copied the required jar files into my libs folder which have been automatically added into Android Dependencies by Eclipse) and I can use it just fine. Well, sort of. There is another issue that may or may not be related to this, but I'd rather open another question for that.

However, whenever I use ical4j, it keeps complaining that it cannot find the ical4j.properties file. I get the following error:

08-14 17:45:02.430: I/Configurator(17046): ical4j.properties not found.

Wchich is apparently caused by this line in ical4j's Configurator.java file:

CONFIG.load(Configurator.class.getResourceAsStream("/ical4j.properties"));

The ical4j Wiki shows the file should be located in the src folder. However this does not work.

I've tried placing the file in the following project folders: src, res, libs, assets, the Android root folder, bin, bin/res, and even within all of my packages inside the src folder. However nothing works. It simply does not see it.

So where should this file be?


Solution

  • The problem was, believe it or not, creating the CalendarBuilder object in a non-main thread. CalendarBuilder from ical4j is not thread-safe, so it causes all sorts of issues.