Monday 2 August 2021

Attempt to invoke interface method 'boolean com.google.common.util.concurrent.ListenableFuture.cancel(boolean)' on a null object reference

I am trying to figure out how to get sensors data from Health Services on Wear OS.

I'm trying to run samples (Passive Data Sample) from the official guide on Emulator for Wear OS API 30 (He is available in Beta Android Studio Arctic Fox), but I get this error:

2021-07-02 16:55:54.041 7172-7200/com.example.passivedata E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1
Process: com.example.passivedata, PID: 7172
java.lang.NullPointerException: Attempt to invoke interface method 'boolean com.google.common.util.concurrent.ListenableFuture.cancel(boolean)' on a null object reference
    at android.os.Parcel.createExceptionOrNull(Parcel.java:2392)
    at android.os.Parcel.createException(Parcel.java:2370)
    at android.os.Parcel.readException(Parcel.java:2353)
    at android.os.Parcel.readException(Parcel.java:2295)
    at androidx.health.services.client.impl.IPassiveMonitoringApiService$Stub$Proxy.registerDataCallback(IPassiveMonitoringApiService.java:318)
    at androidx.health.services.client.impl.ServiceBackedPassiveMonitoringClient$registerDataCallbackInternal$serviceOperation$1.execute(ServiceBackedPassiveMonitoringClient.kt:122)
    at androidx.health.services.client.impl.ipc.Client$3.execute(Client.java:222)
    at androidx.health.services.client.impl.ipc.internal.ServiceConnection.execute(ServiceConnection.java:243)
    at androidx.health.services.client.impl.ipc.internal.ServiceConnection.enqueue(ServiceConnection.java:200)
    at androidx.health.services.client.impl.ipc.internal.ConnectionManager.handleMessage(ConnectionManager.java:123)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:223)
    at android.os.HandlerThread.run(HandlerThread.java:67)

Has anyone faced a similar problem?



from Attempt to invoke interface method 'boolean com.google.common.util.concurrent.ListenableFuture.cancel(boolean)' on a null object reference

No comments:

Post a Comment