Hi zeeshan , As you said you have changed only the text file. I assume that you have added your new file in assets folder. I am not sure if you have added Ur_file_name.xml in res/layout folder. I mean you should also add a .xml file in layout folder with the same name as your file. You can also check it is already done as read_asset.xml in layout folder. Just check, i am guessing that this is the problem.
Thanks, Naina On 2/19/09, david liu <[email protected]> wrote: > Can you paste the log here? > > On Thu, Feb 19, 2009 at 6:31 PM, zeeshan <[email protected]> wrote: > >> >> i am trying to access a resource file by >> >> try { >> InputStream is = getAssets().open("read_asset.txt"); >> >> >> int size = is.available(); >> >> byte[] buffer = new byte[size]; >> is.read(buffer); >> is.close(); >> >> // Convert the buffer into a string. >> String text = new String(buffer); >> >> // Finally stick the string into the text view. >> TextView tv = (TextView)findViewById(R.id.text); >> tv.setText(text); >> } catch (IOException e) { >> >> // Should never happen! >> throw new RuntimeException(e); >> } >> >> >> >> and it is returning me exception, please help me >> >> >> >> thanks >> > >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

