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

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

问题描述

在我的 Android 应用中,我使用:

In my Android app I use:

import javax.xml.bind.JAXBContext;

但我明白了:

导入javax.xml.bind无法解析

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

推荐答案

将 JAR 放在项目的 libs/ 目录中,然后通过添加 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.

不过,此时我怀疑您会收到编译错误.通常,您不能将 javajavax 包中的类导入到 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.

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

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