如何启用物理键盘模拟器在 Android 工作室? (用于工作)

我不确定是什么改变了,但我电脑上的物理键盘不再适用于模拟器(在 Nexus5中运行 kitkat,x86)。当我查看 AVD 设备的高级设置时,没有硬件键盘。这是什么地方?

60406 次浏览

Find the emulator's configuration in your home directory:

//Located in:
~/.android/avd/<The_Device_Name>/config.ini

For example, on the Nexus 5 (created by Android Studio), it was:

~/.android/avd/Nexus5.avd/config.ini

Change the below setting to be:

hw.keyboard=yes

In the advanced settings of a virtual device in Android Studio 1.0.2 AVD Manager, there is actually a checkbox that allows to enable keyboard input without editing the config.ini by hand.

Tools → Android → AVD Manager → pencil icon (shown in picture) → Show Advanced Settings (scroll to bottom) → Enable Keyboard Input

enter image description here

Open and Navigate to Tools → Android → AVD Manager → Edit -> pencil icon)

enter image description here

Click on Show Advanced settings and scroll down and you can see the option Enable Keyboard input (example second image) Check that box and Click on Finish.

enter image description here

UPDATE:

Change hw.keyboard = yes.

And make the file config.ini Read-only:

1.Right-click on the file open its settings.

2.Make every options on the permissions tab into Read-only(refer screenshot)

enter image description here

Trust me this will work it happens because this file gets rewritten,when we lock it out the bug disappears.