Ofek Ron
Ofek Ron

Reputation: 8580

Android Studio Auto Import without pressing shortcuts

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

Answers (3)

IamVk009
IamVk009

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

Akhil
Akhil

Reputation: 6697

You need to enable "Auto import"

enter image description here

Upvotes: 1

agilob
agilob

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

Related Questions