Hello every body i have been facing this problem from several days ,i have searched it every where but no result.i have clear and build project but still error " R cannot be resolved to a variable" and also i don't found R.java in project folders.
Asked
Active
Viewed 135 times
0
-
check if there is any error in xml resources.. or in any other place.. check the console for eror – stinepike May 27 '13 at 05:50
-
http://stackoverflow.com/a/5780894/1838457 – Android Developer May 27 '13 at 05:50
-
i have checked there is nothing like that,becoz this error comes in all java files of my projects – May 27 '13 at 05:51
-
there is an error like this:2013-05-27 11:02:14 - prefrences] Unable to resolve target 'android-10' [2013-05-27 11:02:14 - prefrences] Unable to resolve target 'android-10' [2013-05-27 11:02:14 - practice] Unable to resolve target 'android-13' [2013-05-27 11:02:14 - LearningInfoTech] Unable to resolve target 'android-16' – May 27 '13 at 05:53
-
check package name in manifest file is same as in ur java file. – Senthil May 27 '13 at 05:53
-
http://stackoverflow.com/questions/16636039/java-lang-classnotfoundexception-after-changing-nothing-in-the-project-but-upgra/16636127#16636127. try this if you have updated adt to rev 22 – Raghunandan May 27 '13 at 05:54
-
ya dear i have updated my adt to rev 22.the error comes just after updation – May 27 '13 at 05:55
-
Hi @SajadBinNazir Update your sdk – Rank May 27 '13 at 05:56
-
@SajadBinNazir then follow the link i posted in the above comment. That should solve your problem. Make sure you have installed the build tools from the android sdk manager – Raghunandan May 27 '13 at 05:57
-
ok then again click on update sdk and install build tools – Athul Harikumar May 27 '13 at 05:58
-
@SajadBinNazir which will you give Android SDK "Build tools", it is required for 22.0.0 adt version. – Rank May 27 '13 at 05:59
-
Recheck your imports , and make sure you don't have any import that ends with .R; , also try to recheck resources for any capital letter named picture or xml . – mmoghrabi May 27 '13 at 06:06
-
i am not able to open even my sdk manager,it shows check for updates and finaly ends with no update found @Raghunandan – May 27 '13 at 06:13
-
@SajadBinNazir i can't help coz i am not aware of it. May be other can. – Raghunandan May 27 '13 at 06:14
-
ok @Raghunandan no problem thnks for ur suggestion – May 27 '13 at 06:15
-
I also want to add that R.java is missing in generated java files – May 27 '13 at 06:19
2 Answers
0
If you're running a 64-bit system, you need to install ia32-libs:
sudo apt-get install ia32-libs

AndroidEnthusiastic
- 941
- 9
- 22
0
R.java is java generated file .so you can't change details on R.java file. If your faceing problem for that. please check xml file for activity and add resouecres. R.java file will bepalced in "Gen " folder in your project files.

Subbu
- 46
- 1