LicenseChecker checkAccess leaks ServiceConnection

后端 未结 4 952
遥遥无期
遥遥无期 2021-01-07 22:18

I am receiving this exception in LogCat every time I press the Back button in my app:

Activity has leaked ServiceConnection com.android

4条回答
  •  旧巷少年郎
    2021-01-07 23:00

    I just got the same problem, and with your update and zapl's comment I figured up that the problem is the emulator you are using.

    This Emulators don't have the Google Play APIs, and the LVL can't bind to the service, leaving a connection open, at the end LVL can't close it with the onDestroy call.

    Just create a new AVD using Google APIs instead of Android x.x and try your code there, if you don´t find the Google APIs in the Target pulldown when creating the new AVD download it with the Android SDK Manager.

提交回复
热议问题