當(dāng)我嘗試運(yùn)行我的應(yīng)用程序時(shí),應(yīng)用程序崩潰了,并且在日志 cat 中我看到了這個(gè)錯(cuò)誤。--------- beginning of crash09-07 22:46:49.571 3479-3479/com.example.www.mytaxiapp E/AndroidRuntime: FATAL EXCEPTION: mainProcess: com.example.www.mytaxiapp, PID: 3479java.lang.ClassCastException: com.example.www.mytaxiapp.Welcome cannot be cast to com.google.android.gms.location.LocationListener at com.example.www.mytaxiapp.Welcome.startLocationUpdates(Welcome.java:272) at com.example.www.mytaxiapp.Welcome.onConnected(Welcome.java:308)這是我的進(jìn)口import android.Manifest;import android.content.pm.PackageManager;import android.location.Location;import android.location.LocationListener;import android.os.Handler;import android.os.SystemClock;import android.support.annotation.NonNull;import android.support.annotation.Nullable;import android.support.design.widget.Snackbar;import android.support.v4.app.ActivityCompat;import android.support.v4.app.FragmentActivity;import android.os.Bundle;import android.util.Log;import android.view.animation.Interpolator;import android.view.animation.LinearInterpolator;import android.widget.Toast;import com.firebase.geofire.GeoFire;import com.firebase.geofire.GeoLocation;import com.github.glomadrian.materialanimatedswitch.MaterialAnimatedSwitch;import com.google.android.gms.common.ConnectionResult;import com.google.android.gms.common.GooglePlayServicesUtil;import com.google.android.gms.common.api.GoogleApiClient;import com.google.android.gms.location.LocationRequest;import com.google.android.gms.location.zzal;import com.google.android.gms.location.LocationServices;import com.google.android.gms.maps.CameraUpdateFactory;import com.google.android.gms.maps.GoogleMap;import com.google.android.gms.maps.OnMapReadyCallback;import com.google.android.gms.maps.SupportMapFragment;
添加回答
舉報(bào)
0/150
提交
取消