O....K..., but if I followed the instructions at the tutorial,
shouldn't it be named "main.xml"? What could possibly cause it to be
named anything else?

Now don't get me wrong, I am grateful for your reply, and will double
check what it actually got named to once I am back to that partition
(I run Eclipse only under my Fedora11 installation).

BTW: about your other post, suggesting removing "import android.R". I
take it that also assumes that "main.xml" was misnamed. After all:
before the import statement was there, I was still getting the same
error messages on R.layout. The difference was that after adding the
import statement, Quick Fix had no suggestions for how to fix the
errors.

On Nov 3, 6:41 pm, Justin Anderson <[email protected]> wrote:
> Do you have a res/layout/main.xml file?
>
> R.layout.main is a resource that points to a file named main.xml in the
> res/layout folder... If that file is named something else, say test.xml,
> then you need to use R.layout.test instead
>
> ----------------------------------------------------------------------
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> ----------------------------------------------------------------------
>
> On Tue, Nov 3, 2009 at 10:26 AM, Indicator Veritatis <[email protected]>wrote:
>
> > I am pretty sure I followed all the instructions in the tutorial at
>
> >http://developer.android.com/intl/fr/guide/tutorials/views/hello-webv...
> > correctly, yet by step 4, I am still seeing Eclipse showing
> > "R.layout.main cannot be resolved", (and the same for R.id.webview)
> > even though Quick Fix already added the "import android.R" at the top
> > of all my imports.
>
> > So the code reads like this:
>
> > package com.mejohnsn.android.HelloWebView; //NB: this particular
> > tutorial said nothing about how to choose this name
>
> > import android.R; // added by Quick Fix. I also tried "fix project"
> > import android.app.Activity;
> > import android.os.Bundle;
> > import android.webkit.WebView;
>
> > public class HelloWebView extends Activity {
> >        WebView webview;
> >    /** Called when the activity is first created. */
> >   �...@override
> >    public void onCreate(Bundle savedInstanceState) {
> >        super.onCreate(savedInstanceState);
> >        setContentView(R.layout.main);
> >        webview = (WebView) findViewById(R.id.webview);
> >        webview.getSettings().setJavaScriptEnabled(true);
> >        webview.loadUrl("http://www.google.com";);
> >    }
> > }
>
> > So why can't it resolve R.layout.main?? And why, in Quick Fix, did
> > "fix project" propose a 1.5r_3 jar, when I chose to target 1.6? Is
> > this a hint to where the problem really lies?
>
> > --
> > 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]<android-beginners%[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-beginners?hl=en

-- 
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