Graham
Graham

Reputation: 5884

import javax.xml.transform cannot be resolved

I am trying to write some xml generated by my Android app to a file and I'm trying to use javax.xml.transform to do this. Only problem is that javax.xml.transform is not being found by eclipse.

The only options that come up are javax.xml and javax.xml.parsers. Does anyone know what could be going on?

Edit: Just an fyi I have Java JDK 6 update 22 installed.

Upvotes: 5

Views: 13910

Answers (3)

thilinab
thilinab

Reputation: 117

javax.xml.transform is only available in API level 8+.

even if you add the JRE System Libraries, it'll error at runtime.

Upvotes: 4

Hurda
Hurda

Reputation: 4715

I'm not exactly an android developer but if you have Android project in Eclipse and something is not on the classpath (not in import options) it probably means it won't be available on Android.

Upvotes: 1

Graham
Graham

Reputation: 5884

I just found out what to do. If you right click on whatever project your working on and go to properties. Then in the libraries tab click add libraries and add the JRE System Library then it has a bunch of new imports that can be used including javax.xml.transform.

That took forever to find out that simple thing =P. But now I know.

Upvotes: 8

Related Questions