Android Studio - automatic insertion of import class using alt + enter does not work
Hi,
I'm still struggling with the error cannot find symbol in Android studio, when I don't know which class to import into Android studio. The abbreviation alt + enter for autoimport should work for that, but unfortunately I can't. Can anyone advise what to do with it? Thanks
Hi,
To import an auto java class in android studio, follow these steps:
Editor - Code style - Java - Imports
- use single class import
- insert imports for inner classes
Editor - General - Auto Import - Java
- show import popup
- optimize imports on the fly
- add unambiguous import on the fly
Then just press alt + enter in the given place, which causes the error cannot find symbol, and the class will be imported itself
As for android libraries, I'm looking in the Android package index:
developer.android.com/reference/packages
I'm still struggling with the error cannot find symbol in Android studio, when I don't know which class to import into Android studio. The abbreviation alt + enter for autoimport should work for that, but unfortunately I can't. Can anyone advise what to do with it? Thanks
REPLY
Hi,
To import an auto java class in android studio, follow these steps:
Editor - Code style - Java - Imports
- use single class import
- insert imports for inner classes
Editor - General - Auto Import - Java
- show import popup
- optimize imports on the fly
- add unambiguous import on the fly
Then just press alt + enter in the given place, which causes the error cannot find symbol, and the class will be imported itself
As for android libraries, I'm looking in the Android package index:
developer.android.com/reference/packages