android.os.ServiceSpecificException: GPIO2_IO02 is already in use (code 16)

[亡魂溺海] 提交于 2019-12-02 00:39:06

问题


I am working on android things(Pico i.MX7D I/O).I got android.os.ServiceSpecificException: GPIO2_IO02 is already in use (code 16) exception,What it means by this? Please help me.

My sample program is cloned from https://github.com/androidthings/sample-button.


回答1:


This means another app is running in the background and is currently accessing this pin. This may happen if one app is not fully stopped before a new one is opened.

You can see all your installed apps by running: adb shell pm list packages -3

You can force stop a program by running adb shell am force-stop <package name>

Uninstalling or force stopping the rogue app should allow you to properly get control of it.

Edit: As a comment pointed out, I did not include the command to do uninstalling. adb uninstall <package-name>



来源:https://stackoverflow.com/questions/48437428/android-os-servicespecificexception-gpio2-io02-is-already-in-use-code-16

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!