2

After importing project in Android Studio, the automatic inspections (with android lint) feature is disabled. Code errors are not highlighted like they should be. I made a new project and everything works great in the new one (but I need to use the one I imported). I tried to uncheck "Power saving mode" and use "Invalid caches / Restart" and it didn't help, the inspections configuration is set to default. The "Analyze -> Inspect code" feature works fine. I cannot find the solution, please help. I have the latest update of Android Studio.

Jesus Christ
  • 457
  • 1
  • 5
  • 10

3 Answers3

6

I personally never faced this issue but you can try any of these solutions and see if it works:-

a) check if Power Save Mode on File menu is disabled

b) Go File > Invalidate Caches / Restart... > Click at Invalidate and Restart

c) File -> Settings

Project Settings

Inspections - ensure that Android and Android Lint is checked, or alternately just set it back to default using the dropdown box at the top.

IDE Settings

Editor -> Code Completion - ensure the Autopopup code completion is checked (and check the rest of the settings based on your preference.

d) Just remove all the folder "AndroidStudioPreview";

On Windows:

Go to your User Folder - on Windows 7/8 this would be:

[SYSDRIVE]:\Users[your username] (ex. C:\Users\abc)

In this folder there should be a folder called .AndroidStudioPreview

Finally restart.

min2bro
  • 4,509
  • 5
  • 29
  • 55
2

After trying almost everything I found out that source and resource directories are not marked in Open Module Settings. After marking them, the inspections started to work automatically. What is weird is that my coworker who uses the mac version of Android Studio didn't need to do this (after importing the same project).

Jesus Christ
  • 457
  • 1
  • 5
  • 10
0

you click on the right mouse then you choose customize highlight level.you click on that and you can choose one of three choice.you want to be unitial state you choose -> import popup and inspection. Good Luck!!!!

trung
  • 1