


Input the search keyword auto-import on the right side search box and click the enter key to search.Click the Keymap menu item on the popup Settings window.Click android studio File -> Settings menu item.Below are the steps for creating an android studio shortcut key combination to auto-import all missing imports.Create auto-import Shortcut Key In Android Studio. You can read or edit shortcuts there also. In the right panel, you can see all the keymap shortcuts listed in different categories.Click File -> Settings menu item in android studio ( Windos or Linux ) or Android Studio -> Preferences ( macOS ), in the popup dialog click Keymap in the left panel.If you do not remember them, you can find all the shortcuts follow the below steps. There are a lot of shortcuts in android studio which are very useful when you are writing java source code.The subsequent settings are very similar to section 1.1.

Then click the Editor -> Auto Import menu item on the left side of the popup Preferences dialog window.Just click the Android Studio -> Preferences menu item to open the Preferences dialog window.If you use macOS, the only difference is where you can configure the above settings.Then android studio will ask you whether import the class or not, you can press Alt+Enter to import it. If you select Ask in the Insert imports on paste drop-down list in the above Settings -> Editor -> General -> Auto Import dialog window.Now when you write or paste a class name in your java source code, the android studio will automatically import the class with its package.

And check the Add unambiguous imports on the fly and all other checkboxes.
