Regarding the cases when the R class does not get generated/updated in
time, try the following (in no particular order):

- Manually delete the R.java class, so the next time it will generate
a completely new one.
- Right click on the project -> Android Tools -> Fix Project
Properties
- Clean the project under Project -> Clean
- Restart Eclipse

Regarding the case when updating the text in the layout did not
reflect in the emulator, are you sure the latest project was deployed
to the emulator?  Can you confirm that the APK is built and pushed to
the emulator by looking at the console?  Sometimes, the ADB has issues
and it disconnects with the emulator.  If this was the case, your
emulator was still running the previous version.

On Sep 3, 11:49 am, leeuwerik <[email protected]> wrote:
> I'm brand new to Android (although not to Eclipse and Java).
> Yesterday I installed ADT within Eclipse (always latest versions) both
> on Windows and XP.
> Then I try creating HelloWorld by following the tutorial.
>
> When creatin the android project I get an error on the line
> setContentView(R.layout.main) ==> R unknown.
>
> I tried ctr-shift-O ==> import android.R is added but the error
> remains.
>
> Undaunted I follow the tuturial and edit to create a TextView instead
> ==> application runs, i.e. I see a mobile terminal image with
> 'ANDROID' written in the centre. On XP it's strange: after a seemingly
> long time-out the text font changes and an icon (android) is added
> after the text.
>
> Next I try editing the resource .xml files as suggested in the
> tutorial in order to change the text. This also implies reintroducing
> the line with setContentView(R.layout.main) in lieu of the TextView.
> This time no error reported !!!!
>
> When inspecting main.xml, the new layout and text look OK. Yet when
> running the application I keep getting the same mobile picture, i.e.
> without the new text. It looks like the emulation doesn't work
> properly.
> I rebuilt the application from scratch and did another tutorial, with
> the same negative result.
>
> I must say that I'm lost.
> Can anyone help please ????
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to