tutorial problem - adding another activity

  • Replies:1
  • Answered
sydney maxcy
  • Forum posts: 9

Jan 13, 2015, 10:40:35 PM via Website

I'm a newbie and going through the tutorials: The first one went fine and so I went on to the second part : adding on a second activity to respond to a button, The following method snippet was put into the main_activity.java file: public void sendMessage(View view) {
Intent intent = new Intent(this, DisplayMessageActivity.class);
I get 2 errors here, no reference to view and the DisplayMessageActivity class. The second error is because the class has not been created yet. The error about the View class not being found and view not being used at all has me confused. The code in the method block never uses view! I would think there is a problem with the tutorial!! How do I fix this?

Reply
sydney maxcy
  • Forum posts: 9

Jan 24, 2015, 4:40:08 PM via Website

I'll answer my own question: later in the tutorial a class is created that uses these missing references and the errors will go away when the class is added to the code. The tutorial should mention this.

Reply