如何解决javax.xml.bind.JAXBContext在Eclipse? [英] How to resolve javax.xml.bind.JAXBContext in Eclipse?

查看:2954
本文介绍了如何解决javax.xml.bind.JAXBContext在Eclipse?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Andr​​oid应用程序使用:

In my android app I use:

进口javax.xml.bind.JAXBContext;

import javax.xml.bind.JAXBContext;

但我得到:

进口javax.xml.bind中不能得到解决。

The import javax.xml.bind cannot be resolved

我有com.viewstreet.java.eclipse.jaxbplugin.JAXBPlugin在我的插件列表...

I do have "com.viewstreet.java.eclipse.jaxbplugin.JAXBPlugin" in my plugins list...

推荐答案

将在项目的库/ 目录中的JAR,然后通过添加添加到构建路径JAR文件按钮。这是我的标准配方,似乎工作,它有把JAR在合适的地方的命令行的优势,构建也是如此。

Put the JAR in the project's libs/ directory, then add it to the build path via the Add JARs button. That's my standard recipe, and it seems to work, and it has the advantage of putting the JAR in the right spot for command-line builds as well.

在这一点上,不过,我怀疑你会得到一个编译错误。通常情况下,你不能在 Java导入类的javax 封装成一个Android项目。

At this point, though, I suspect that you will get a compile error. Generally, you cannot import classes in the java and javax packages into an Android project.

这篇关于如何解决javax.xml.bind.JAXBContext在Eclipse?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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