Go Back   Android Forums > Android Discussion > Android Applications
Android Applications All the information you could ever want about Android Applications. Learn about apps and get help with them... all here! New apps can be found and announced in the Applications Announcements forum linked below.

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
LinkBack Thread Tools
Old October 17th, 2011, 06:01 PM   #1 (permalink)
New Member
Thread Author (OP)
Join Date: Sep 2010
Posts: 12
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default Resources$NotFoundException error

I'm getting a Resources$NotFoundException error when attempting to write text to a TextView after I have clicked on a button.

If I update the text within the click event it works OK but as soon as I attempt to update the text in a different method (called from within the click event) the error occurs.

Can someone help me solve this issue as I've been going round in circles on this for ages. Below is my code.


    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        Button buttonCancel = (Button) findViewById(R.id.get_usage);
        buttonCancel.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
       //The TextView updates fine if placed here
        TextView tv = (TextView) findViewById(R.id.Usage);
        tv.setText("Test123"); // updates OK without error

           //The error occurs in this method


 private void UpdateGUIWithUsageInformation(String newText)
        //Current Usage
        TextView tv = (TextView) findViewById(R.id.Usage);
        tv.setText(newText); // Error occurs on this line
This is from my main.xml.

Lintz is offline  
Reply With Quote
sponsored links

Go Back   Android Forums > Android Discussion > Android Applications
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 05:32 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.