Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Extra credit: Getting started with Android

I'm trying to do the Java section of the extra credit, but the app keeps on crashing in the emulator. (I've already seen the other discussion with basically the same question, but when I copied the code, it doesn't seem to work for me....)

I put my code below :) Thanks everyone!

final TextView tView = (TextView) findViewById(R.id.textView1);
Button getButton = (Button) findViewById(R.id.button1); 
final TextView eView = (TextView) findViewById(R.id.editText1);

        getButton.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {

                String tValue = eView.getText().toString();
                tView.setText(tValue); 
            }
        });