Even if you have set Keymap for Android Studio as that found in Eclipse (if not follow this tutorial) you may see that the Ctrl + Shift + O auto-import keyboard shortcut does not work for java files. In order to get it working you need to follow the below steps,
![Enable Auto imports Enable Auto imports](https://code2care.org/pages/android-studio-ctrl-shift-o-auto-import-not-working/images/Enable Auto imports.png)
Enable Auto imports
Enable Auto Imports in IntelliJ Android Studio
- Under Menu : Go to Files → Settings on Windows. (if your on Mac OS X go to Android Studio → Preferences)
- Search for Editor.
- Under Editor Section look for Auto Import.
- Now under Java Select both Add unambiguous imports on the fly and Optimize imports on a fly.
- Apply Changes and Click OK.
That's it!! just try Ctrl+Shift+O now and you would see auto imports working just as it does in eclipse IDE.
More Posts related to Android,
- Increase Android Emulator Timeout time
- Android : Remove ListView Separator/divider programmatically or using xml property
- Error : Invalid key hash.The key hash does not match any stored key hashes
- How to Change Android Toast Position?
- Android Alert Dialog with Checkboxes example
- Android : No Launcher activity found! Error
- Android Development: Spinners with Example
- Failed to sync Gradle project Error:failed to find target android-23
- INSTALL_FAILED_INSUFFICIENT_STORAGE Android Error
- Disable Fading Edges Scroll Effect Android Views
- How to create Toast messages in Android?
- Channel 50 SMSes received every few minutes Android Phones
- Android xml error Attribute is missing the Android namespace prefix [Solution]
- Create Custom Android AlertDialog
- How To Disable Landscape Mode in Android Application
- Android Development - How to switch between two Activities
- incorrect line ending: found carriage return (\r) without corresponding newline (\n)
- Generate Facebook Android SDK keyhash using java code
- Android Error Generating Final Archive - Debug Certificate Expired
- 21 Useful Android Emulator Short-cut Keyboard Keys
- Android RatingBar Example
- 11 Weeks of Android Online Sessions-15-Jun-to-28-Aug-2020
- Download interrupted: Unknown Host dl-ssl.google.com Error Android SDK Manager
- fill_parent vs match_parent vs wrap_content
- Android : Connection with adb was interrupted 0 attempts have been made to reconnect
More Posts:
- Change Google Chrome Browsers default download location - Chrome
- [Nopepad++] How to add text at end of each line - NotepadPlusPlus
- Android Studio : Connection Error : Failed to download patch file - Android-Studio
- How to Delete a Sheet in Excel on Mac - Microsoft
- Remove Apps from Dock when Quit [Mac Ventura] - MacOS
- Create a Zip file using Java Code programmatically - Java
- Fetch as Google Crawl Error or Redirected Status - Google
- AWS S3 CLI BucketAlreadyExists when calling CreateBucket Error make_bucket failed - AWS