Search code examples
android-studioandroid-lint

Android Studio does not find suspicious code


When running Analyze > Inspect Code Android Studio does not start the inspection progress. Instead it shows the message 'No suspicious code found' even if there is suspicious code.

Code inspection worked in the same project once and works well in any other project. Of course inspections in this project are enabled. Analyzing single files also works.

I'm using Android Studio 1.2.2.


Solution

  • Turns out this seems to be a problem with Android Studio and Lint's spelling errors.

    I had a "Ok" in my strings.xml (with a lower case 'k') so Lint complained about this as it is typically written with an upper case K. This caused all files of the whole project not being analyzed for suspicious code. After renaming it to "OK" code inspection works again.

    By the way, disabling the Lint spelling errors inspections did not solve the problem.

    I filed a bug for this: https://code.google.com/p/android/issues/detail?id=180417&thanks=180417&ts=1437119965