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.
Thanks for this after reading a bunch of stack overflow questions changing the build tools version was what helped.Thank you.
ReplyDeleteThis 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!
ReplyDeleteI did this but it cannot solve this
ReplyDeleteThanks a lot, I did haven't idea why Android studio showed this problem and Now is working.
ReplyDeleteThanks a lot, I did haven't idea why Android studio showed this problem and Now is working.
ReplyDeleteThanks a lot. This really helped me. :)
ReplyDeleteThanks that worked for me.
ReplyDeleteThis worked awesome!! I will bookmark your site thanks...
ReplyDeletemuchas gracias, me funciono a la perfeccion.
ReplyDeleteDo: Build > Clean Project
ReplyDeleteIMPORTANT: 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.
ReplyDeleteThank you