Android的更新17似乎与外部罐不兼容 [英] Android update 17 seems incompatible with external Jars

查看:129
本文介绍了Android的更新17似乎与外部罐不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是让我的Mac上做的Java安装的更新,现在我的一些老的jar(如 javax.mail 的Apache。 commons.httpclient )扔的未找到类的运行时异常!

含义,它们编译罚款,但随后崩溃在运行时有看起来像这样的例外:

  E / dalvikvm(2414):找不到类的javax.mail.internet.InternetAddress,从法com.my.project.Main.isValidEmailAddress引用
 

我需要得到有这些类的jar文件的较新版本?或者,我需要恢复到爪哇我的previous版本?

或者,这是一些我只是假设有做与Java更新完全不相关的问题的(将是很巧合,这一切完美工作之前更新)的?

解决方案
  

坠毁在运行时有看起来像这样的例外:   找不到类的javax.mail.internet.InternetAddress,从法com.my.project.Main.isValidEmailAddress引用

如果你有问题,外部的罐子,然后:

  1. 创建一个文件夹名为
  2. 复制和所有所需的外部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)?

解决方案

crash at run time with exceptions that look like this: Could not find class 'javax.mail.internet.InternetAddress', referenced from method com.my.project.Main.isValidEmailAddress

If you have problems with external jars, then:

  1. create a folder named libs.
  2. 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似乎与外部罐不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆