问题描述
我只是让我的Mac上做的Java安装的更新,现在我的一些老的jar(如 javax.mail
和的Apache。 commons.httpclient
)扔的未找到类的运行时异常!
含义,它们编译罚款,但随后崩溃在运行时有看起来像这样的例外:
E / dalvikvm(2414):找不到类的javax.mail.internet.InternetAddress,从法com.my.project.Main.isValidEmailAddress引用
我需要得到有这些类的jar文件的较新版本?或者,我需要恢复到爪哇我的previous版本?
或者,这是一些我只是假设有做与Java更新完全不相关的问题的(将是很巧合,这一切完美工作之前更新)的?
如果你有问题,外部的罐子,然后:
- 创建一个文件夹名为
库
。 - 复制和所有所需的外部JAR文件粘贴到该文件夹。
它会自动被包括在内,因为在此页上解释说:与Android的项目依赖关系处理
I just allowed my Mac to do an update on its Java installation and now some of my old jars (like javax.mail
and apache.commons.httpclient
) are throwing "class not found" exceptions at run time!
Meaning, they compile fine, but then crash at run time with exceptions that look like this:
E/dalvikvm(2414): Could not find class 'javax.mail.internet.InternetAddress', referenced from method com.my.project.Main.isValidEmailAddress
Do I need to get more recent versions of the jars that have those classes? Or do I need to revert to my previous version of Java?
Or is this some totally unrelated problem that I'm just assuming has to do with the Java update (would be quite a coincidence, all of this worked perfectly prior to the update)?
If you have problems with external jars, then:
- create a folder named
libs
. - Copy and paste all needed external jar files into that folder.
It will automatically be included, as explained on this page: Dealing with dependencies in Android projects
这篇关于Android的更新17似乎与外部罐不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!