Reputation: 8580
I have just migrated from eclipse to android studio and i am used to not having to explicitly press anything for importing a class, unless ovcourse there is a conflict or more then one candidates, unfortounately its not the same in my android studio by default, how do i set Android Studio to auto import without any special explicit action by me?
Upvotes: 0
Views: 234
Reputation: 61
## For Windows Users only ##
Navigate to -
Files > Settings > Editor > General > Auto Import
Check on -
1] Show import popup. ✓
2] Add unambiguous imports on the fly. ✓
3] Optimize imports on the fly. ✓
4] Auto import in completion. ✓
Then you are set.
Upvotes: 0
Reputation: 6223
Settings -> Code Style -> Java -> Imports
Android Studio is a fork of IntelliJ IDEA, if you have any problem with it, google for intellij instead of Android studio, they have very good documentation.
https://www.jetbrains.com/idea/help/general-guidelines.html
Upvotes: 0