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. How to use AUDIO_SERVICE ?

While calling:
AudioManager aManager = (AudioManager) ct.getSystemService
(Context.AUDIO_SERVICE);

i get this error :

E/AndroidRuntime(  416): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  416): java.lang.RuntimeException: Unable to start
activity ComponentInfo{com.fmcc.callrecorder/
com.fmcc.callrecorder.CallRecorder}: java.l
ang.NullPointerException
E/AndroidRuntime(  416):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2401)
E/AndroidRuntime(  416):        at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2417)
E/AndroidRuntime(  416):        at android.app.ActivityThread.access
$2100(ActivityThread.java:116)
E/AndroidRuntime(  416):        at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1794)
E/AndroidRuntime(  416):        at android.os.Handler.dispatchMessage
(Handler.java:99)
E/AndroidRuntime(  416):        at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  416):        at android.app.ActivityThread.main
(ActivityThread.java:4203)
E/AndroidRuntime(  416):        at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  416):        at java.lang.reflect.Method.invoke
(Method.java:521)
E/AndroidRuntime(  416):        at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(  416):        at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/AndroidRuntime(  416):        at dalvik.system.NativeStart.main
(Native Method)
E/AndroidRuntime(  416): Caused by: java.lang.NullPointerException
E/AndroidRuntime(  416):        at
com.fmcc.callrecorder.CallRecorder.onCreate(CallRecorder.java:57)
E/AndroidRuntime(  416):        at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
E/AndroidRuntime(  416):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2364)
E/AndroidRuntime(  416):        ... 11 more

What have i doing wrong ?

-- 

2. Collection of ADC2 App Winner APK Pac

Barusan main ke droidappz ternyata dah ada yg ngumpulin apk-nya ADC2 App Winner!

monggo diunduh:
http://www.mediafire.com/file/znzljmmzrzn/ADC2%20Winners.zip

source:
http://droidappz.org/showthread.php?t=3045

kalo dari comment2 di forum itu masih ada beberapa yg gak jalan. gw
juga blon nyobain sih, baru donlot aja :)


-- 
/**
 * @Name Rayhan
 * @GTalk saviourcat
 * @Yahoo md_ray
 * @Twitter md_ray
 * @SentFrom web
 */

--~--~---------~--~----~------------~-------~--~----~
=========================
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click  

3. GK : How to Use Android Open source Platform code

4. Is there any posibility to know the size of the video file?

5. Can I protect the usage of my own Platform Java API using signatures or similar protection?

6. Android on treo 650

7. Where to get a Samsung Moment for development