android studio 未检测到错误

Oli*_*ley 1 ide android android-studio

我使用的是 android studio 1.0.2,它似乎没有自动导入或检测错误。我能够使用 ctrl + space 获得方法建议,但我无法弄清楚为什么它没有检测到错误。如果我在代码行之间添加随机文本,则表示构建成功。

在此输入图像描述

附图是它的样子,我已经正确完成了 android-studio 设置。请帮助我这是否与最新的 android studio 版本有关?

Ali*_*786 5

android studio中有一个省电模式,如果你不小心点击它,它将禁用代码分析,这将减少电池消耗,性能也会提高,但它不会检测任何错误并执行自动完成操作。

禁用省电模式

- Go to File Menu of Studio
- Uncheck The Power Saver Mode
Run Code Online (Sandbox Code Playgroud)

在您的 IDE 中,代码分析将使用 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
Run Code Online (Sandbox Code Playgroud)