How to navigate to error lines in Android Studio by shortcut?

How can I navigate to the error lines in a java file?

Isn't there any better way than scrolling to them?


I searched for it and found the answer.

1- you can use F2 and SHIFT+F2 shortcut to navigate between errors in your document. if there is no error you will be navigated to the warnings.

2- another way that most of us know is to click on the red areas on the scrollbar.

here is the the link to the intelliJ IDEA help documents which is the base of Android Studio.

you can even press F2 in project window of Android Studio and it will select the files containing errors.

Also if there are no more errors it will point to warnings.


F2 is shortcut key to jump on next error line in java file. SHIFT+F2 shortcut to navigate between errors in your document. if there is no error you will be navigated to the warnings.


I have another approach, Make Project by press(Ctrl-F9), you can find the errors in Gradle Console(if error exists), just click the red messages will bring you to the error of line directly.


You can use below shortcuts for compilation errors:

  • Moving to next / previous highlighted error: F2/Shift + F2

  • Show descriptions of error at caret: Ctrl + F1