问题
I just set up of Android development environment in Ubuntu 12.04. I made an AVD for Android version 2.3.3 and ran my app on it. But I am not able to use my computer's keyboard or keyboard given on the right side of it. What is the reason for this?
My ADT version is 20.0. I was earlier developing on Windows and it was working fine.
回答1:
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.
回答2:
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.
回答3:
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.
来源:https://stackoverflow.com/questions/11316818/unable-to-use-keyboard-in-android-emulator