Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
956 views
in Technique[技术] by (71.8m points)

android - How to resolve javax.xml.bind.JAXBContext in Eclipse?

In my Android app I use:

import javax.xml.bind.JAXBContext;

But I get:

The import javax.xml.bind cannot be resolved

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

@commonsware is correct , just add respctive JAXB API jars in lib folder of your projet or in case of maven project add dependency in pom file

<!-- 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>

viz in my case on linux, solved the issue


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...