0

I have downloaded ADT on my laptop(Ubuntu)... that problem R cannot be resolved as a variable (gen/R.java is missing) is showing again. I tried all the possible solutions found on Google.. nothing changed.. I even re-installed ADT but same problem.. is there any new suggestion! Please help..

console is showing this error.. does that has any relation with R file..

[2014-02-11 20:06:04 - myApp] /home/wassim/Desktop/adt-bundle-linux-x86_64-
20131030/sdk/build-tools/android-4.4/aapt: error while loading shared libraries: 
libstdc++.so.6: cannot open shared object file: No such file or directory
challenger
  • 2,184
  • 1
  • 18
  • 25

2 Answers2

0

That's an error related to the resource file of Android projects. It's build automatically and holds references to the resource like layouts/styles/strings; whatever you put into the .xml files (and images). Cleaning/Rebuilding the project, restarting Eclipse and adding a resource are all promising ways to hint Eclipse that it needs to regenerate that file.
A common mistake is also to import Android.R instead of import my.package.R.

More thorough advice probably here: R cannot be resolved - Android error.

[Edit:] Having read the error message again, my wild guess is that actually a lib from the SDK is missing (so that the not generated R file is more of a side effect). Is your SDK up to date?

Community
  • 1
  • 1
Janis F
  • 2,637
  • 1
  • 25
  • 36
  • i didn't put anything.. i just created a new project ... – challenger Feb 11 '14 at 19:05
  • It happens that generation of the R file fails in that case, I actually remember that happening to me. Please try the approaches regarding the generation of R. If they won't take you further, we'll try to diagnose whether there's a problem with your SDK rather than ADT. – Janis F Feb 11 '14 at 19:09
-1

This has something to do with Eclipse I guess. I too run into this a lot of times. This also happens when eclipse is not able to build the project. Try restarting eclipse (or closing and starting again), wait for the workspace to build, if it does error will go away, if not try cleaning the project (Project + Clean). It should go away. Lemme know if it does or even doesn't. :)

Atul O Holic
  • 6,692
  • 4
  • 39
  • 74