我在android studio中有这样的代码:
@Override
public void onLocationChanged(AMapLocation amapLocation) {
if (amapLocation != null && amapLocation.getAMapException() != null
&& amapLocation.getAMapException().getErrorCode() == 0) {
// get location information
mLocation = amapLocation;
MyApp.getInstance().getPrefs().Latitude()
.put("" + amapLocation.getLatitude());
MyApp.getInstance().getPrefs().Longitude()
.put("" + amapLocation.getLongitude());
}
}
getAMapException 方法返回从 Exception 扩展的 AMapLocException 实例。
现在 android studio 显示了一些提示,我不知道如何处理它们。
报告对忽略调用结果并返回 Throwable类型(或子类型)的对象的特定方法的调用。通常这些类型的方法被用作异常的工厂方法,并且应该抛出结果。
而且我还通过google找到了ThrowableResultOfMethodCallIgnored.java文件源,但我仍然不知道如何处理它。