问题
I am using android studio 1.0.2, it doesn't seem to auto import or detect errors. I was able to get method suggestions using ctrl + space but I couldn't figure out why its not detecting errors. If I add random text between lines of code it says build is successful.

attached image is how it looks like, I have android-studio settings done properly. Please help me is it something to do with latest android studio build?
回答1:
There is a power saver mode in android studio if accidentally you click on that it will disable code analysis which will reduce the battery consumption and performance will also increase but it will not detect any errors and do auto complete operations.
To disable power saver mode
- Go to File Menu of Studio
- Uncheck The Power Saver Mode
In your IDE code analysis will be shown using an eye symbol at the right corner of your android studio.
If Green means it is enabled and there is no error in your code.
If Red Means It is enabled but there are few errors in your code.
If It is white or blur then code analysis is disabled
来源:https://stackoverflow.com/questions/27801755/android-studio-not-detecting-errors