简体   繁体   中英

Android Studio import class shortcut

I've looked at How to auto import the necessary classes in Android Studio with shortcut? but it doesn't help.

Ctrl + Alt + O does nothing.

在此输入图像描述

When I press alt+enter I get the following:

在此输入图像描述

I do not want this, I wish for it to appear as a normal import at the top of the file.

What are these shortcuts called in Android Studio? This program makes it complicated to edit such simple shortcuts.

I also have auto-imports, but it isn't working:

在此输入图像描述

Finally after hours of trail and error the following settings is what fixed it:

在此输入图像描述

在此输入图像描述

在Mac上按Ctrl + Space将打开一个对话框,以选择要导入的库。

check this link for detail ans https://stackoverflow.com/a/37362700/3288890

or

goto file -> setting select keymap and search for auto import and add keyboard short cut

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM