Android Studio lint highlight with Timber not working

457 views Asked by At

I've integrated Timber into a new project. And I cannot make the lint highlight to work. Meaning stuff like this:

Timber.i("Hello, " + "world!");    

Isn't highlighted to yellow.

Am I missing something? Is there a setting for this? Running a ./gradlew lint generated a lovely report which finds exactly what I want, so the lint rules are somewhere in my project. Yet the IDE does not want to highlight that on the fly.

Things like new String("x") are highlighted, and mostly my IDE settings are default, so something works.

I have another bigger project with Timber and highlights work perfectly - so there is my suspicion that I'm missing something on the level of project config.

1

There are 1 answers

0
Niklas On

This was an issue with Android Studio 2.3 & Timber 4.5.1 or earlier.

If you upgrade Android Studio to 3.0 & Timber to 4.6.0 you should get this highlighted correctly. There was an issue in the Android Source Code and also in Timber. This was fixed now in both recent versions though.

You can see the Timber fix and a gif with your showcase here.