Eclipse can get out of synch with itself.  Usually I can get it
back together by doing Projects | Clean and forcing everything
to rebuild.  Also right click on each project and do a Refresh.

There is a setting Windows | Preferences | General | Workspace
that does refresh and build automatically.  This tends to help.

It's a learning curve,



On Mar 8, 12:56 am, neckar <[email protected]> wrote:
> Hello all,
>
> I've installed the android SDK, Eclipse and the ADT plugin (got all
> the latest versions from the official websites: eclipse 3.4.2 from
> which I installed the ADT plugin and SDK 1.1_r1 from google).
>
> I've set the SDK in eclipse and also added it to the PATH environment
> variable (I'm running Win XP SP2) and have entered the necessary Run
> configurations settings in eclipse.
>
> Yet trying to open each of the sample projects and create a Hello
> Android project of my own consistently gets the following error from
> eclipse: R cannot be resolved.
>
> I still don't know much about the framework but have read that the
> R.java is suppose to be generated automatically. Eclipse suggests
> adding an import to android.R, but the tutorial I'm reading seems to
> have no such import and even if I add the import the problem persist
> as the 'main' class simply isn't there.
>
> I've changed the relevant code so to omit the use of the R class from
> this:
>
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
>
> to this:
>
> TextView tv = new TextView(this);
> tv.setText("Hello, Android");
> setContentView(tv);
>
> While this did make the aforementioned error go away I still couldn't
> run the project since eclipse doesn't seem to work well with the ADT
> plugin (that's my guess at least) and the doesn't build the project.
>
> When I Run it I get the following output on the console:
>
> [2009-03-08 09:19:09 - Hello Android] ----------------------
> [2009-03-08 09:19:09 - Hello Android] Android Launch!
> [2009-03-08 09:19:09 - Hello Android] adb is running normally.
> [2009-03-08 09:19:09 - Hello Android] Could not find Hello
> Android.apk!
>
> The emulatore doesn't start of course. It seems to me like there's a
> problem with the ADT and Eclipse so that the projects aren't created
> properly (that R.java file is suppose to be created automatically
> according to what I've read).
>
> any clues as to what's gone wrong here and how can I fix it?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to