Hi, thanks for responding.

What I get under Window>Show View>Problems after trying to run the
HelloWebView project is:

Description: Errors (1 item) Conversion to Dalvik format failed with
error 1
Resource: HelloWebView
Location: Unknown
Type: Android ADT problem.

BTW: while trying to build another project, I switched to DDMS
perspective, which showed me something new (well, at least I did not
notice it before while building/running under Java perspective): in a
tab/window titled "HelloWorld.java", it showed "Resource '/HelloWorld/
src/com/cyrilmottier/android/HelloWorld/HelloWorld.java' does not
exist.

Now to interpret this, you will no doubt need some context here:
HelloWorld.java is a completely separate project, from a tutorial done
by Cyril Mottier. So what on earth is that message doing here, when I
am running/building a this project, HelloWebView? Nor can I find any
reference to HelloWorld under HelloWebView in the (Eclipse) Package/
Project Explorers. This is why I have begun to suspect there is
something broken with my Eclipse installation (or workspace). Is there
a way to reset all the Eclipse configurations to installation defaults
and re-install Android and the ADT? Or would I have to completely un-
install Eclipse and Android to test my hypothesis?


Another (for this post, final) BTW: I got the same Dalvik error
message doing a successful build of Mottier's HelloWorld project
(initial version in his tutorial).

On Nov 3, 11:06 pm, Justin Anderson <[email protected]> wrote:
> When Eclipse gives the "Your project contains errors..." message when
> building, what shows up in the problems tab?
> ----------------------------------------------------------------------
> 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 7:57 PM, Indicator Veritatis 
> <[email protected]>wrote:> This is what main.xml looks like:
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> > android"
> >    android:layout_width="wrap_content"
> >    android:layout_height="wrap_content"
> >    android:orientation="vertical">
>
> >    <WebView
> >        android:id="@+id/webview"
> >        android:layout_width="fill_parent"
> >        android:layout_height="fill_parent"
> >    />
>
> > </LinearLayout>
>
> > That is, I assumed that "main.xml" is the file the instructions in
> > step 2 of the tutorial (http://developer.android.com/intl/fr/guide/
> > tutorials/views/hello-webview.html<http://developer.android.com/intl/fr/guide/%0Atutorials/views/hello-w...>)
> > refers to, so I edited it as
> > called for.
>
> > So 'R.layout.main' is correct.
>
> > Now for your other suggestion, other errors: after executing "Clean
> > Project" and rebuilding a few times, I now have the strange situation
> > that no errors show up in the java source code editor nor in the
> > console when executing 'Build Project"; but the other projects are
> > showing the little read X, and when I try to RUN HelloWebView as an
> > Android Application, I get the error message, "Your project contains
> > errors...".
>
> > But then why are the errors only showing up under other projects?? The
> > Console is still empty. So is the error log.
>
> > This gives me the feeling there is something really busted in my
> > Eclipse installation. I have Eclipse IDE 1.2.0.20090619-0620 and ADT
> > 0.9.3.200909031112-12954.
>
> > On Nov 3, 3:29 pm, Lance Nanek <[email protected]> wrote:
> > > >import android.R;
>
> > > That actually has to be removed for your purposes. The android.R class
> > > is for built-in stuff, like android.R.drawable.ic_menu_edit. The R
> > > class with your layout and other things from your app will be in the
> > > package declared in your AndroidManifest.xml.
>
> > > I've seen cases where this class wasn't generated when there were
> > > errors elsewhere in the project, particularly in XML files. Check the
> > > console and problem views for any errors other than relating to the R
> > > class. Sometimes cleaning those up allows the R class to start getting
> > > generated properly.
>
> > > On Nov 3, 12:26 pm, Indicator Veritatis <[email protected]> wrote:
>
> > > > I am pretty sure I followed all the instructions in the tutorial
> > athttp://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