The solution is to change the project settings to build using the latest Android SDK, as described below.
- In the Android Studio IDE, select File | Project Structure.
The Project Structure dialog box appears. - If not selected, choose the Project app module.
- Under the Properties tab, in the Compile Sdk Version field, choose the latest SDK .e.g API 21: Android 5.0 (Lollipop).
- In the Build Tools Version field, choose the latest version, e.g. 21.1.1.
- Click OK.
The project is refreshed and the error messages no longer appear.
11 comments:
Thanks for this after reading a bunch of stack overflow questions changing the build tools version was what helped.Thank you.
This did not resolve the issue for me. It is indeed using lolipop, and build tools version 21.1.2. I am trying to create an app that uses openstreetmaps and import org.andnav.osm.R; is throwing up a bunch of errors. Please help!
I did this but it cannot solve this
Thanks a lot, I did haven't idea why Android studio showed this problem and Now is working.
Thanks a lot, I did haven't idea why Android studio showed this problem and Now is working.
Thanks a lot. This really helped me. :)
Thanks that worked for me.
This worked awesome!! I will bookmark your site thanks...
muchas gracias, me funciono a la perfeccion.
Do: Build > Clean Project
IMPORTANT: Make sure you don't have any Errors after Clean Project in Message Pane (Alt+0). If you find any red circles with exclamation mark, than you must remove those errors in your code.
Mostly these errors are related to @string/ or @array/. Clean Project again and done!
This worked for me after reading and trying all possible solutions on stackoverflow for the past 4 to 6 hours.
Thank you
Post a Comment