Android LocationListener类没有';是否没有onLocationChanged()方法?

Android LocationListener类没有';是否没有onLocationChanged()方法?,android,Android,使用此代码: private class WRYLocationListener implements LocationListener //private class WRYLocationListener extends LocationListener <- I tried this, too, with the same results { @Override public void onLocationChanged(Location loc) { . . .

使用此代码:

private class WRYLocationListener implements LocationListener
//private class WRYLocationListener extends LocationListener <- I tried this, too, with the same results
{
    @Override
    public void onLocationChanged(Location loc) {
. . .
私有类WRYLocationListener实现LocationListener

//私有类WRYLocationListener扩展LocationListener
实现
是唯一有意义的东西,因为它是一个接口


然而,接口的
@Override
注释是JDK 6特性,而不是JDK 5,应该删除。在JDK 5中,
@Override
只有在类重写超类方法时才有效(与实现接口方法相反)。

实际上,我使用的是JDK7,这在为Google Maps帐户生成MD5值时已经让我有点难过(不得不追溯到“古代的日子”)下载JDK6让它工作。所以,因为它(@Override)是“犹太教的”在JDK6中,有人会认为它也在JDK7中,不是吗?@ClayShannon-Hmm,是的,它在JDK7中很好,但是你在JDK7中编译你的Android东西?你的IDE的合规性设置为1.5吗?我不知道;你是如何设置的?我不知道你在使用什么IDE。它应该在项目设置中的某个地方。Android项目应该使用1.5合规性。它是设置为1.5。我正在使用Eclipse、Java、JDK、Android下载、Windows7等所有最新工具——所有工具都是在上周左右安装的。