我想使用GPS获取当前位置.
这是我的情景.我的班级定义是:
public class UseGps extends Activity implements LocationListener
Run Code Online (Sandbox Code Playgroud)
如果Í尝试覆盖这样的LocationListener方法
1)
@Override
public void onLocationChanged(Location loc)
Run Code Online (Sandbox Code Playgroud)
2)
@Override
public void onProviderDisabled(String provider)
Run Code Online (Sandbox Code Playgroud)
3)
@Override
public void onProviderEnabled(String provider)
Run Code Online (Sandbox Code Playgroud)
它给我编译错误说
The method onStatusChanged(String, int, Bundle) of type UseGps must override a superclass method remove override.
2)和3)相同
这有什么不对?