修改javax.xml.stream.*成android可用的libraries
Modifying XML libraries for Android
javax.xml.stream.* 這個java libraries在android是不被支援的, 以上
連結提到如何修改成android 可支援的library
先下載此檔
解壓縮, 在解壓縮目錄下, 建立output資料夾
執行 generate_android_jars.bat
, 在output內的libraries即可用來供
android 使用.
使用時要將
另外以下還提到, 使用repackage javax.*的方法, 或使用android支援的
XmlSerializer
javax.xml.stream.*
改成 edu.usf.cutr.javax.xml.stream.*
:另外以下還提到, 使用repackage javax.*的方法, 或使用android支援的
XmlSerializer
XMLStreamWriter
is in thejavax.xml.stream.*
package. This package is not included in the default Android build. You can use it, but you have to repackage it in your app.
Description of your problem and a guide on how to repackage javax.* packages:http://code.google.com/p/dalvik/wiki/JavaxPackagesIf you don't want to repackageXMLStreamWriter
in your app, try usingXmlSerializer
which is included in Android. Excellent example right here on SO: Writing XML on Android