开发者

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 开发者_如何学JAVAknow what could be going on?

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


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.


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

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜