R cannot be resolved!

by ramywhite » Fri, 18 Jul 2008 21:40:55 GMT


Sponsored Links
 Hi,
I am new to Android. I have opened the notepad tutorial and it worked
very fine with Eclipse 3.4.0 under Windows XP but when I tried to open
the Snake sample, it gave me an error " R cannot be resolved" I have
noticed that there is no R.java in the project. What is I did wrong?
Any help will be appreciated.
Many thanks
ramywhite

--~--~---------~--~----~------------~-------~--~----~



R cannot be resolved!

by Mark Murphy » Fri, 18 Jul 2008 21:52:10 GMT


 > I am new to Android. I have opened the notepad tutorial and it worked

I can't speak specifically for Eclipse.

However, R.java is generated as part of the Android project build process.
If you haven't compiled the project yet, R.java probably does not exist.
Try building it, following the instructions on the Android Web site, and
see if that clears up your problem:

 http://code.google.com/android/intro/hello-android.html 
 http://code.google.com/android/intro/installing.html #developingwitheclipse

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ -- Available Now!


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


R cannot be resolved!

by ramywhite » Sun, 20 Jul 2008 00:36:02 GMT


 Hi Mark,
Thank you for your nice replay. I did as you said and I have
successfully built all the samples except 2 samples "Snake" and
"LunarLander". I don't know why. What is the difference between those
2 and the others?
Thank you
ramywhite

--~--~---------~--~----~------------~-------~--~----~



R cannot be resolved!

by Mark Murphy » Sun, 20 Jul 2008 01:37:37 GMT


 


1. Did you get specific build-time or run-time errors for them? If so, 
what are the error messages?

2. Have you tried building them outside of Eclipse?

Again, I'm not an Eclipse guy, so I will not be much help with 
Eclipse-specific issues.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
Warescription: All titles, revisions, & ebook formats, just $35/year

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. i570EDXJC4...0.00kb

para android lover..g br abis flash ke i570EDXJC4 tp memory internal
jd 0.00kb...ada yg alami kasus sama ga? napa ya?

-- 
"Indonesian Android Community [id-android]" 

2. Second Android

hi semuanya

lg cari nih second second Android, berbagai merk, kalau tertarik boleh
japri..


-- 
Frans Thamura
Meruvian.
Experiential Tempation of Java and Enterprise OpenSource

Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi SMK
yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma

Mobile: +6287885901958
Blog & Profile: http://frans.thamura.info

We provide services to migrate your apps to Java (web), in amazing fast and
reliable.

-- 
"Indonesian Android Community [id-android]" 

3. Market shows: "Localized to: unknown" - issue 5930 is still not fixed?

4. HTML5 Geolocation Features

5. graphically represent multiple list selections or dynamically change a list item view

6. Maintaining Original rowId

7. Exchange the content of a Tab