0

Anybody tried it?

I already had old Android SDK installed with Eclipse, with old workspace (named "workspace"). Recently, I update Android SDK R20, I tried new a HelloWorld using template of MasterDetailFlow. OK, it work as expected.

But when I create a new workspace (ex. "newworkspace") and create another HelloWorld, it always generate default java code with error:

  • in ItemListActivity.java The method onItemSelected(String) of type ItemListActivity must override a superclass method

  • in ItemListFragment.java The method onItemSelected(String) of type new ItemListFragment.Callbacks(){} must override a superclass method

I checked with HelloWorld in original workspace, the code are same, without error.

Any body can advise?

Please.

Chow Thomas
  • 41
  • 1
  • 4
  • 2
    The workspace is being built with JDK 1.5 instead of JDK 1.6. See http://stackoverflow.com/questions/1678122/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips – yhyrcanus Jun 29 '12 at 17:05
  • Yes, it's OK now, after set Java Compiler level. 1000 x THANKS:) – Chow Thomas Jun 29 '12 at 17:27
  • Also, I don't think you need to download the Android SDK from their site. When you install the new software directly from Eclipse, I believe it downloads the SDK for you. I tried it and I somehow now have 2 versions of the SDK that are in different files. – Kurty Jun 29 '12 at 17:29

1 Answers1

0

Check your workspace settings. A new workspace has its own settings, which may be different from the settings in the previous workspace.

Also, when you update your SDK, you need to update your ADT tools as well. Go to Window > Check for Updates.

Joe Malin
  • 8,621
  • 1
  • 23
  • 18