microg / UnifiedNlp

Alternative network location provider for Android, with plugin interface to easily integrate third-party location providers.
978 stars 210 forks source link

NoSuchMethodError: android.location.Location.getElapsedRealtimeNanos #86

Closed agilob closed 8 years ago

agilob commented 8 years ago

I get this exception when I (re-)enable a location backend.

java.lang.NoSuchMethodError: android.location.Location.getElapsedRealtimeNanos at 
org.microg.nlp.location.BackendHelper.updateElapsedRealtimeNanos(BackendHelper.java:112) at 
org.microg.nlp.location.BackendHelper.setLastLocation(BackendHelper.java:102) at 
org.microg.nlp.location.BackendHelper.access$200(BackendHelper.java:40) at 
org.microg.nlp.location.BackendHelper$Callback.report(BackendHelper.java:156) at 
org.microg.nlp.api.LocationCallback$Stub.onTransact(LocationCallback.java:55) at 
android.os.Binder.execTransact(Binder.java:367) at 
dalvik.system.NativeStart.run(Native Method)

When this exception is thrown, Apple backend crashes with NPE:

java.lang.NullPointerException
at org.microg.nlp.backend.apple.BackendService$1.run(BackendService.java:79)
at java.lang.Thread.run(Thread.java:856)

Android 4.1.2 LG phone, stock ROM, I removed GAPPS manually.

mar-v-in commented 8 years ago

Fixed in version 1.6.6

agilob commented 8 years ago

Nice, thanks!

agilob commented 8 years ago

Out of curiosity, why is UnifiedNlp.apk not in your fdroid repo?

mar-v-in commented 8 years ago

It is: https://f-droid.org/repository/browse/?fdfilter=org.microg.nlp&fdid=org.microg.nlp

agilob commented 8 years ago

I meant this one; https://microg.org/fdroid.html

mar-v-in commented 8 years ago

The F-Droid client app currently does not work very well with packages being offered in multiple repos. Although this was improved lately (by displaying the repo a package originates from), it's still not perfect (e.g. updates that you can't install because of a different signature/repo will still cause a notification). As this will be confusing for the user and the app is already available in the main F-Droid repo, I think its better to not include it in the repo at the moment.

Once the F-Droid client starts to properly different apps from different sources (maybe by signature) this is of course a good idea, but you can already see problems with GmsCore in my repo which shares the same package name as the no gapps build of UnifiedNlp in the F-Droid repo.