Google’s ApiDemos sample code is great. It gives you everything you need. Unless you’ve already configured your Eclipse environment, you may get a ton of Warnings when you add the ApiDemos sample app to your workspace. Here’s how to get rid of those annoying warnings.
Note that you don’t have to get rid of the Warnings. The ApiDemos app will build and run perfectly fine. This is purely for getting rid of the annoyances.
This section should be fairly straight-forward.
Your beautiful Problems view will now have these monstrosities.

Decision time. You can either change the global Eclipse settings or do this on a per-project basis. I’m going to show you both ways, and you’re more than welcome to do it whichever way you want.
For per-project: you right-click on the project and choose Properties.

For global Eclipse, you go to:
Windows: Window -> Preferences
Mac OSX: Eclipse -> Preferences

The next steps will be the same for both methods.
Go to Java -> Compiler -> Errors/Warnings
Time to make the changes. For the per-project option, you will need to check off the box “Enable project specific settings“. Also note that you can jump to the Global option by clicking the Configure Workspace Settings… link.
Similarly, you can jump to a Project Specific by clicking on the link



Now your Problems view is nice and clean again! Yay! Hope this helped those who ran into the warnings.
