yes, the res/layout/main.xml file in the hello world example code in the android adt reads as follows in eclipse for me:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout> michael brown On Mar 22, 12:02 pm, Justin Anderson <magouyaw...@gmail.com> wrote: > Do you have a file called res/layout/main.xml in your project? > > Thanks, > Justin Anderson > MagouyaWare Developerhttp://sites.google.com/site/magouyaware > > On Thu, Mar 22, 2012 at 11:00 AM, firebreather <michaelirvingbr...@gmail.com > > > > > wrote: > > when i try to run the intro example hello world code i get the error > > message "R cannot be resolved to a variable", for the > > "setContentView(R.layout.main)" line of the intro code. since this bug > > is the the android adt's own intro example code everyone would > > encounter this error starting out, and when i do i google search of R > > cannot be resolved to a variable" error" i get 61,600,000 results of > > newbies running into the same bug as me starting out. there havent > > been many anwers though. one suggestion was: > > > "While going through the Android sample tutorials, I would often use > > the Ctrl + Shift + O command to "Organize Imports" and generate any > > missing import statements. Sometimes this would generate the incorrect > > import statement which would hide the R.java class that is > > automatically generated when you build." > > > typing "Ctrl + Shift + O" does indeed make a hidden "import > > android.R;" command suddenly appear in the example hello world code. > > however, just commenting this out doesnt solve anything, it still > > gives the "R cannot be resolved to a variable" message and wont > > compile. typing Ctrl + Shift + O again just makes the hidden "import > > android.R;" message appear again. > > > youd think since this is there own hello world example code they'd > > have this bug fixed or addressed. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en