217

I want to see warnings of my code in Android Studio, But i am unable to find the option to display warnings view. In case of eclipse we can see the warnings in the "Problems" view.

Can anyone suggest me, how to view warnings in android studio?

2
  • Use Navigate -> Previous Message (ctrl + alt + up) or Next message (ctrl + alt + down) Commented Aug 13, 2015 at 7:27
  • 1
    See this outstanding feature request youtrack.jetbrains.com/issue/IDEA-68854 Commented Jul 8, 2016 at 21:13

7 Answers 7

290

If, on the toolbar, you click Analyze -> Inspect Code; then in the window that pops up select how much of your project you want to inspect (I usually do Whole Project, but you might want to select a specific module), then click okay.

Android Studio will work for a bit, then the inspection window will pop up from the bottom with a list of results, subdivided by inspection.

Sign up to request clarification or add additional context in comments.

7 Comments

This does not show Java compiler warnings, but Android Lint issues!
That depends on the inspection profile you have selected! You can run a lot of inspections, including Java!
on Studio 1.5, this method displays ALL the issues, not only the ones related to Lint as explained by lage
on Studio version 2, it does not show any warnings (though my codes have obvious issues marked in yellow). Potential bug?
In my file, all my warnings are on the fields, and say "Make private." It is very time-consuming to press "Alt + Enter" in order to make each individual field have a modifier of private. Is it possible to resolve all the warnings at once in order to have all the fields made private at once?
|
48

Build -> Make Project (Ctrl + F9) gives what we can get equivalent of Eclipse's “Problems” view on Android Studio

1 Comment

Agree, I really don't get why this isn't what you see when you hit "run" and it errors out. Really need a way to pull up this view when you build that way.
26

you can use F2 to next problems, see more here: Navigating to Next/Previous Error

2 Comments

This felt like the most usable to me on a file by file basis. I just looked for the yellow in the sidebar to see if I needed to hit F2.
After hitting F2 the warning or error displays on the status portion of the main window.
5

GO to View-->Tool Windows-->Messages to view the warnings

1 Comment

This is outdated with the current version of Android Studio (3.3).
3

Even i searched all the settings in Android Studio, but couldn't find a separate window for it. The warnings are actually visible to the right end of a particular line as a small yellow marker and clicking on that show the warnings in the status bar below. The colors of them can be editted in the inspection options.

Hope this helps you.

4 Comments

Thanks for responding me. You are right but i need the warning screen shot for my project.
@vinuthan after running the Analyze / Inspect Code as per the above answer, you will get all the warnings in the Inspect tab
What about for errors such as "Cannot resolve symbol 'xyz'"? Eclipse would show all this in a long errors/warnings view. Can this view be made to work similarly?
Thanks, that was what I was looking for. Easy to miss that.
2

The closest thing Android Studio/IntelliJ has to the Problems view in Eclipse is to use the Problems section of the Project tool window. With that open, navigate down to any classes that appear there and open them in the editor. Once in the editor, you can use F2 to jump between errors in the open file.

Unfortunately, IntelliJ's Problems tool window shows classes with errors nested by folder/package, so you have to expand several levels and it takes up a lot of screen real estate to see even one error. It also doesn't list the errors individually, forcing you to first open the problematic file and then use F2 to navigate to each one. I also had the problem that errors in files that weren't open, didn't show up there.

Comments

0

[opening warning screen in android studio

  • Click the warning icon as marked in the image.
  • Warning screen will open.

][click to see image] here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.