Unable to use keyboard in Android emulator

白昼怎懂夜的黑 提交于 2019-12-03 09:28:45
rishiag

Got the answer from here. Apparently they have removed default keyboard support after ADT 20.0, so we need to add keyboard support manually by editing the AVD.

I have just tested and it still works perfectly. You just need to enable this. And I do not see anything in the AVD documentation that would show it is no longer supported. Probably they have added the support back.

AVD settings for the different Android version seem slightly different. For old versions (2.x), add the hardware property "Keyboard support", set the value to yes, as shown here:

For newer versions, there is a checkbox you need to check:

I have just tested on my Android development environment (Eclipse, Ubuntu) - for both cases, the keyboard does work inside the emulator.

If you're using Eclipse/ADT in Windows 8.1 you have to enable keyboard support by changing this setting:

hw.keyboard = yes

which is located in the hardware.ini of your AVD skin. You can find it here:

<ANDROID_SDK_PATH>\sdk\platforms\android-<APIversion>\skins\<YourSkin>\hardware.ini

Since the default is (for most skins, including Galaxy S2 one which I'm using mostly) set to no.

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