How to get Eclipse to recognize R and resources in Android Lunar Lander?

I am trying to create an Lunar Lander example for Android in Eclipse, but part of the code does not compile. Anywhere in the code that references "R." gives me errors. At first he said that R was not recognized or declared, so I imported it from Android via the quick fix menu. But now the resources referenced after R are not recognized.

How can i fix this? Thank!

+3
source share
3 answers

I think you are importing android.R U need to import the file com.example.android.lunarlander.R

+4
source

try using getResource () for R link

+1
source

, , hdpi , (res\drawable-hdpi\image.xcf) jpg. xcf. .

0
source

All Articles