java.lang.ClassCastException: com.currentlocationdemo.MapsActivity cannot be cast to com.google.android.gms.location.LocationListener

Stack Overflow | Atish | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    How to refresh my current latitude longitube at background in android

    Stack Overflow | 8 months ago | Atish
    java.lang.ClassCastException: com.currentlocationdemo.MapsActivity cannot be cast to com.google.android.gms.location.LocationListener

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.currentlocationdemo.MapsActivity cannot be cast to com.google.android.gms.location.LocationListener

      at com.currentlocationdemo.MapsActivity.onConnected()
    2. com.currentlocationdemo
      MapsActivity.onConnected
      1. com.currentlocationdemo.MapsActivity.onConnected(MapsActivity.java:228)
      1 frame
    3. com.google.android
      zzd$zzd.handleMessage
      1. com.google.android.gms.common.internal.zzl.zzo(Unknown Source)
      2. com.google.android.gms.internal.zzpy.zzm(Unknown Source)
      3. com.google.android.gms.internal.zzpw.zzapp(Unknown Source)
      4. com.google.android.gms.internal.zzpw.onConnected(Unknown Source)
      5. com.google.android.gms.internal.zzqa.onConnected(Unknown Source)
      6. com.google.android.gms.internal.zzpp.onConnected(Unknown Source)
      7. com.google.android.gms.common.internal.zzk$1.onConnected(Unknown Source)
      8. com.google.android.gms.common.internal.zzd$zzj.zzasd(Unknown Source)
      9. com.google.android.gms.common.internal.zzd$zza.zzc(Unknown Source)
      10. com.google.android.gms.common.internal.zzd$zza.zzv(Unknown Source)
      11. com.google.android.gms.common.internal.zzd$zze.zzasf(Unknown Source)
      12. com.google.android.gms.common.internal.zzd$zzd.handleMessage(Unknown Source)
      12 frames
    4. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:102)
      2. android.os.Looper.loop(Looper.java:135)
      3. android.app.ActivityThread.main(ActivityThread.java:5930)
      3 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
      2 frames