0

I have annoying problem with this override annotation, I have come to google to find a solution but I can't find any clue. I have set the JDK Compliance to 1.6 it has a default, but eclipse still ask me to remove the override, what should I do to overcome this thing?

import android.os.Bundle;
import android.app.Activity;
import android.view.*;
import android.widget.*;
public class HelloList extends Activity {
ListView list;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_hello_list);
    list = (ListView)findViewById(R.id.list);
    String[] values = new String[]{"StudentSite", "Staffsite", "BAAK", "Seminar"};
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, android.R.id.text1, values);
    list.setAdapter(adapter);

    list.setOnItemClickListener(new OnItemClickListener()
    {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int pos, long id)
        {
            Toast.makeText(getApplicationContext(), pos, Toast.LENGTH_LONG).show();
        }
    });
}
Raditya Kurnianto
  • 734
  • 1
  • 16
  • 42

1 Answers1

0

Try it to set the SDK to 1.7 version,then it will not ask u to remove the override

Steps are:

  1. Select the Project.
  2. Right click,select the properties.
  3. Select java compiler. set the value to 1.7 and clean the project from menu bar in project tab.
deepak825
  • 432
  • 2
  • 8
  • Ok Did u tried the android tools in right click of project, click the Fix project properties then clean the project then check java compiler – deepak825 Jan 07 '13 at 05:14