当我构建我的项目时,我有这个输出:
onStatusChanged(String,int,Bundle) in LocationListener has been deprecated
我发现我必须用 public class LocationProvider
替换它。有谁知道我该如何解决?有什么想法吗?
最佳答案
必须重写interface LocationListener
的所有方法,但警告可以忽略:
/**
* Notice: This callback will never be invoked and providers can be
* considered as always in the {@link LocationProvider#AVAILABLE} state.
*/
@Override @SuppressWarnings("deprecation")
public void onStatusChanged(String provider, int status, Bundle extras) {}
关于java - LocationListener 中的 onStatusChanged(String,int,Bundle) 已被弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57043225/