Android Studio tip of the day — #2

Help! I can’t find where the syntactical error is 😭

I’m quite sure as a developer you found yourself on multiple scenarios dealing with syntactical mistakes. Most of the times because there was a lot of code written on the file, however the actual highlighted error was practically imperceptible.

Random code that highlights there is either an incorrect type or a wrong argument function.

No matter the amount of time you have dedicated developing software, you will eventually have to face with the same mistakes, like after you pasted some snippets or due to some refactoring.

Random code that highlights you forgot the semicolon character (;)

You may already know the option I’m talking about (IntelliJ), but for the ones who don’t, I’d like to share this tip of discovering syntactical errors on your code, and perhaps it makes you smile like I did when I found it 🙂.

You can also press F2 depending on your system.

Next time you face with this scenario, just remember to find and click the following option in Android Studio: Navigate > Next Highlighted Error (F2) .

The great thing of this option (as opposite of clicking the lateral sidebar) is that the IDE will scroll and position the cursor exactly to the place where the error is.