在 Android 上运行 Joda-time 时遇到问题。
我正在学习 Android,需要日期/时间。一位同事向我推荐了Joda-time,这似乎正是我取得进步所需要的。不幸的是,我无法让它发挥作用。
我使用的是intellij,这是Android 2.2。
我采取的步骤:
- 从 网站 下载 Joda-time jar。
- 智能>文件>项目结构>附加类
- 构建
然后我收到此错误:
警告:忽略不附带关联 EnclosureMethod 属性的匿名内部类的 InnerClasses 属性。 (这个类可能是由损坏的编译器生成的。)
我不知道从这里去哪里。帮助将不胜感激!
I'm learning Android and have need for dates/times. I was recommended Joda-time by a colleague, which seems to be exactly what I need to make progress. Unfortunately, I'm having trouble getting it to work.
I'm using intellij and this is Android 2.2.
Steps I took:
- Download the Joda-time jar from the website.
- Intellij > File > Project Structure > Attach Classes
- Build
I then get this error:
warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.)
I have no idea where to go from here. Help would be appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您没有在 Joda-Time 类上使用反射,则可以忽略该错误。您可以通过使用 Java 1.5 编译器构建 Joda-Time 源代码来解决该问题。
If you're not using reflection on the Joda-Time classes, you can ignore the error. You can fix the problem by building the Joda-Time sourcecode with a Java 1.5 compiler.
我相信您可以安全地忽略这些警告。我把它们放在我包含的库中,但它按预期工作。
I believe you can safely ignore those warning. I get those in my included library but it works as expected.