【问题标题】:Where should I put the ical4j.properties file in an Eclipse Android project?我应该将 ical4j.properties 文件放在 Eclipse Android 项目中的什么位置?
【发布时间】:2012-08-10 23:37:44
【问题描述】:

我有一个独立运行的 Eclipse Android 项目。

我已经包含了一个名为ical4j 的外部库(我已将所需的 jar 文件复制到我的 libs 文件夹中,该文件夹已由 Eclipse 自动添加到 Android Dependencies 中),我可以很好地使用它。嗯,有点。还有一个问题可能与此有关,也可能无关,但我宁愿为此提出另一个问题。

但是,每当我使用 ical4j 时,它总是抱怨找不到 ical4j.properties 文件。我收到以下错误:

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

Wchich 显然是由 ical4j 的 Configurator.java 文件中的这一行引起的:

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

ical4j Wiki 显示该文件应为 located in the src folder。但是这不起作用。

我尝试将文件放在以下项目文件夹中:srcreslibsassets、Android 根文件夹、binbin/res,甚至在 src 文件夹中我所有的包中。但是没有任何效果。它根本看不到它。

那么这个文件应该放在哪里呢?

【问题讨论】:

标签: android eclipse properties-file ical4j


【解决方案1】:

在 Eclipse Proton 中,解决方案是将 ical4j.properties 放入 ProjectName/bin 文件夹。

【讨论】:

    【解决方案2】:

    你应该放入文件夹: 文件资源管理器中的“Projectname/target/classes/ical4j.properties”,而不是 IDE。这对我有用

    【讨论】:

      【解决方案3】:

      不管你信不信,问题是在非主线程中创建CalendarBuilder 对象。 来自 ical4j 的 CalendarBuilder 不是线程安全的,因此会导致各种问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-10-11
        • 1970-01-01
        • 2014-05-17
        • 2014-12-12
        • 1970-01-01
        • 1970-01-01
        • 2010-12-04
        • 2014-12-21
        相关资源
        最近更新 更多