tags:

views:

66

answers:

0

I'm writing a simple calculator app for Android but get the error "savedInstanceState cannot be resolved to a variable" at the end of the "onCreate" method. Any suggestions how to get rid of this error?

My code looks as follows:

package se.robert.kalkylator;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Button;

public class kalkylatorActivity extends Activity {
 public EditText text;
 private Button addButton;

 @Override
 protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  text = (EditText) findViewById(R.id.displayarea);

 }

 // This method is called at button click because we assigned the name to the
 // "On Click property" of the button
 public void myClickHandler(View view) {
  switch (view.getId()) {
  case R.id.add:

//   text.setText("Add!");


   break;
  }

 }
}