在我的 Android 应用中,我使用:
import javax.xml.bind.JAXBContext;
但是我得到:
The import javax.xml.bind cannot be resolved
我的插件列表中确实有 com.viewstreet.java.eclipse.jaxbplugin.JAXBPlugin
。
最佳答案
@commonsware 是正确的,只需在项目的 lib 文件夹中添加相应的 JAXB API jar 或者在 Maven 项目的情况下在 pom 文件中添加依赖项
<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
在我的 linux 案例中,解决了这个问题
关于android - 如何在 Eclipse 中解析 javax.xml.bind.JAXBContext?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5849638/