开发者

Android import project errors

开发者 https://www.devze.com 2023-01-12 08:04 出处:网络
Hey everyone, I\'m a beginner, so I\'ll try my best to explain this problem succinctly. Basically, a friend of mine and I were playing around with the Android SDK, editing a simple RSS reader. We cou

Hey everyone, I'm a beginner, so I'll try my best to explain this problem succinctly.

Basically, a friend of mine and I were playing around with the Android SDK, editing a simple RSS reader. We could launch it in the emulator and even install it on our real devices.

Fast forward a few days, I'm trying to import the exact same code that was working a few days earlier into Eclipse on my laptop.

I tried both importing and new project from existing source. Both return these new errors that we never had originally.

I got an error that involved the auto generated "R" file, but I have solved this. Now, I'm getting 3 errors that I have never had before -

  1. The method onClick(View) of type new View.OnClickListener(){} must override a superclass method - displayed twice ( 2 different lines)

  2. The method onTabChanged(String) of type new TabHost.OnTabChangeListener(){} must override a superclass method

My question is this - What would cause the these discrepancies betwe开发者_如何学Goen importing/running on my friends computer and mine?

Also, we are both using the latest version of Java/Eclipse

Thanks in advance for any insight.


Are you building using the Java 1.5 or 1.6 tools? 1.6 allows the @Override annotation on interface methods, 1.5 does not.

0

精彩评论

暂无评论...
验证码 换一张
取 消