检查边界是否为null时出现错误:
boundsBuilder.include(new LatLng(loc.getLocation().getLat(), loc.getLocation().getLng()));
bounds = boundsBuilder.build();
if (bounds != null) {
LatLng northEast = bounds.northeast;
LatLng southWest = bounds.southwest;
double movingDistance = SphericalUtil.computeDistanceBetween(northEast, southWest);
Log.i("TRIP", "checkoutTime movingDIstance is:" + movingDistance);
if (movingDistance >= kPSGeofencingShortDistance) {
break;
}
if (activeTrip.getDeparture_time() < time + 1)
time = loc.getTimestamp() / 1000 + 1;
Log.i("TRIP", "checkoutTime time is:" + time);
}
Run Code Online (Sandbox Code Playgroud)
错误是:
error: cannot access zzbgl
class file for com.google.android.gms.internal.zzbgl not found
Run Code Online (Sandbox Code Playgroud)
这是我的依赖项:
dependencies {
implementation 'com.android.support:multidex:1.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation …Run Code Online (Sandbox Code Playgroud)