Accepted answer

after updating to sdk tools to rev. 22 for the first time, you may need to relaunch android sdk manager again and install a new item: android sdk build-tools. enter image description here

after installing this, clean your projects and rebuild.


the best solution for missing for linux... is self generated in gen folder.. so better dont edit or create manually by urself ..

-open terminal(alt + ctrl + t) -change directory to skd->tools -then provide executive attribute to all executable file by(sudo chmod +x filename) -do the same for files in sdk->platform tools .. (ie sudo chmod +x filename) .. -----every executable file sud b provided with +x attribute...


just delete gen folder all of your error will be cleared


proven successful method, check the file (androidmanifest.xml) and delete all comments in it, and make sure there are no errors in this file, i tried and did work with me.


if the problem persists then try closing the other projects by

right click -> close unrelated projects !

this worked in my case


for eclipse users: comment the lines including r.* clean and build. will be generated and then uncomment the r.* and rebuild.


try this:

  1. make a backup of your projects on desktop

  2. close eclipse

  3. delete your workspace

  4. restart eclipse and import your projects again.


i had same problem.. i solved by doing the following:

  1. check all xml files and drawable files if there are any capital letters in file name, if you have then change it to lower case, if you are using selector xml files then check the other files you are linking in those files..all should be lower case.

  2. go to java files which show error and remove import file from imports list.

  3. go to projects>>clean.

this should fix the problem. this is how i fixed :)


my issue was that i had android:orientation misspelled in my activity_main.xml file and i was getting this error. i fixed the spelling and problem went away! so make sure activity_main.xml doesn't have any errors in it.


sometimes when you extract your file it miss some part so better when its extracting make sure all file are extracting properly and then run eclipse after that run a simple file and install plugin of avd it helped in my case


changes in your build target also can effect in eclipse so

right click project >> properties >> android >> select latest(usually) android api platform >> click ok

hope this is helpful.


follow these steps...

  1. right click your project.
  2. select properties->android check project build target and api level.
  3. again come back and open android sdk manager chekc the tools and make sure you are installed curresponding android sdk build tools.

eg : if you selected api level 17 in properties you should install android sdk build tools 17..


import android.r - remove this statement from all your classes and then do a clean your r file will be generated. if this did not work then check all your xml files for any errors and then do a clean. these 2 are the most common reasons for r file to go missing


yesterday, i made an update with sdk manager, and i had the same problem as you. i fixed the issue: i have updated another time the android sdk (with the sdk manager tool), then i check update from eclipse for install the updated adt plugin and i rebuid my project. "android sdk build-tools" from android sdk manager is now rev 17 and now it is ok. i think the issue is from adt plugin from eclipse

Related Query

More Query from same tag