Search code examples
androidandroid-studiocode-completion

Force Android Studio to show light bulb


Say I type the following field

field = "I am field";

In Eclipse as soon as I place the mouse on field it shows me a list of options from which I can select create local variable field.

In Android Studio, the lightbulb is a headache for me. Sometimes it appears quickly, sometimes it takes forever to appear.

Example of lightbulb

Is there a way to force it to appear?


Solution

  • Are you talking about using Alt + Enter?

    This link might help: https://www.jetbrains.com/idea/help/keyboard-shortcuts-you-cannot-miss.html

    Pressing Alt + Enter results in the drop-down menu with correction options in this case:

    enter image description here