You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Ran into this crash today. My repo doesn't have latest changes done by @bleege to move location tracking into the SDK. Filing this for tracking since it looks like a bug in third party library.
E/AndroidRuntime(28567): FATAL EXCEPTION: main
E/AndroidRuntime(28567): java.lang.NoSuchMethodError: android.location.Location.getElapsedRealtimeNanos
E/AndroidRuntime(28567): at com.mapzen.android.lost.internal.FusionEngine.isBetterThan(FusionEngine.java:163)
E/AndroidRuntime(28567): at com.mapzen.android.lost.internal.FusionEngine.onLocationChanged(FusionEngine.java:131)
E/AndroidRuntime(28567): at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:237)
E/AndroidRuntime(28567): at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:170)
E/AndroidRuntime(28567): at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:186)
E/AndroidRuntime(28567): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(28567): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(28567): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime(28567): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(28567): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(28567): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime(28567): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime(28567): at dalvik.system.NativeStart.main(Native Method)
@mb12 So it looks like this is getting caught on the different flavors of Jelly Beans. The phone should say API 16 and thus be ok with LOST, but it sounds like it might be a bit confused. To help us get to the bottom of this can you confirm what version the phone thinks it is by running the following code:
I'm trying to nail down where things are coming of the rails. LOST has an API check around the code that is crashing on your phone. This is odd since in theory it shouldn't be executed on your device, but instead run something that is supported on your phone. In other words, I'm just trying to see how the API check plays:
@mb12 Thanks for clarifying that this is a LOST bug. Can you help me understand why the Build.VERSION checks as mentioned ^^ won't work? It doesn't have anything to do with specific versions of a class, so I'm just curious. Does the device that's having difficulties thinks it's API 17 even though it's not? (hence the code question ^^)
I'm going to close this for now as the LOST code appears to do the proper SDK Version checking based on the methods API availability. We also haven't been able to reproduce this internally.
Activity
bleege commentedon Aug 6, 2015
Thanks for reporting this @mb12. Can you describe what device you saw this on as well as which version of Android it's running on?
Looking at the LOST source code it's using an internal
SystemClockclass that does an Android version check before attempting to call this method. The check requires JELLY_BEAN_MR1 (API 17) or higher which is the same API level when the method was added to the Android API.mb12 commentedon Aug 6, 2015
Android 4.1.2.
ljbade commentedon Aug 7, 2015
That's stock Jelly Bean aka API 16.
@mb12 what device is this? And what API level does it report via the version check? You should be able to debug this easily since it all in Java.
ljbade commentedon Aug 7, 2015
@bleege Actually I think that was a bug fix in LOST. Perhaps we need to update the dependency.
ljbade commentedon Aug 7, 2015
OK looking at the git tags 1.0.1 should have this fix.
ljbade commentedon Aug 7, 2015
We are using that version.
@mb12 have you tried cleaning or just a fresh git clone incase your build is somehow still using an old version of LOST?
mb12 commentedon Aug 7, 2015
I commented the tracking code to work around it. I just need a vanilla base map. #1702 is blocking me. Is it possible for someone to analyze it?
bleege commentedon Aug 26, 2015
@mb12 So it looks like this is getting caught on the different flavors of Jelly Beans. The phone should say API 16 and thus be ok with LOST, but it sounds like it might be a bit confused. To help us get to the bottom of this can you confirm what version the phone thinks it is by running the following code:
mb12 commentedon Aug 26, 2015
@bleege Why does this matter? The min supported version is API level 15 (ICS). Jelly Bean/MR1/MR2 are all higher than API Level 15.
#2152
bleege commentedon Aug 26, 2015
@mb12 Agreed. :-)
I'm trying to nail down where things are coming of the rails. LOST has an API check around the code that is crashing on your phone. This is odd since in theory it shouldn't be executed on your device, but instead run something that is supported on your phone. In other words, I'm just trying to see how the API check plays:
mb12 commentedon Aug 27, 2015
@bleege This is a bug in LOST client. It needs to use a factory pattern to pick the right version of Location class (details below).
http://android-developers.blogspot.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html
bleege commentedon Aug 27, 2015
@mb12 Thanks for clarifying that this is a LOST bug. Can you help me understand why the Build.VERSION checks as mentioned ^^ won't work? It doesn't have anything to do with specific versions of a class, so I'm just curious. Does the device that's having difficulties thinks it's API 17 even though it's not? (hence the code question ^^)
bleege commentedon Sep 4, 2015
I'm going to close this for now as the LOST code appears to do the proper SDK Version checking based on the methods API availability. We also haven't been able to reproduce this internally.
Can reopen later if need be.