1

Today.. I have so strange thing on Nexus One.

I have two Android devices, Nexus one and Samsung Galaxy S. Using this two devices, I wish to parse XML file from assets folder. The below is the code.

AssetManager manager = applicationContext.getAssets();
InputStream in = manager.open("station.xml");
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(in);

If I try to use Samsung Galaxy S, everything is fine, but if I use the Nexus One... I have NullPointerException on the last line of the code. The file size is over 1 MB and Samsung Galaxy S Android version is 2.2 and Nexus one is 2.2.1. Nexus one is standard device to develop Android apps.

What is the different between the devices?? What is the problem??? Actually, I have no idea. I googled a lot, but I could not find any clue. If you have any idea, please give me.

Thanks in advance.

mooongcle
  • 3,987
  • 5
  • 33
  • 42
  • I second what @sat said. Essentially your code looks solid so I guess we just need to see the error output. You can get the error log off the device. – Robert Massaioli Mar 14 '11 at 10:01

0 Answers0