我正在使用 android studio 1.0.2,它似乎没有自动导入或检测错误。我能够使用 ctrl + space 获得方法建议,但我无法弄清楚为什么它没有检测到错误。如果我在代码行之间添加随机文本,它表示构建成功。
附图是它的样子,我已经正确完成了 android-studio 设置。请帮助我这与最新的 android studio 构建有关吗?
最佳答案
android studio 中有一个省电模式,如果你不小心点击它会禁用代码分析,这将减少电池消耗,性能也会提高,但它不会检测任何错误并自动完成操作。
关闭省电模式
- Go to File Menu of Studio
- Uncheck The Power Saver Mode
在您的 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
关于android studio 没有检测到错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27801755/