Crash loading WearableActivity

后端 未结 2 965
一向
一向 2021-01-21 00:43

I am receiving a crash with the following message while migrating an AppCompatActivity to a WearableActivity.

Caused by: java.lang.IllegalStateException:

2条回答
  •  清酒与你
    2021-01-21 01:40

    Might want to useAmbientMode.AmbientCallbackProvider instead of WearableActivity.

    It is the new preferred method and it still gives you all the stuff with WearableActivity but you can keep using AppCompatActivity.

    Official docs call out the details (and example code).

提交回复
热议问题