I am playing around with android using the eclipse plugin. I have a
basic layout (main.xml) which has a ImageView.

<RelativeLayout android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android";>
<ImageView android:id="@+id/ImageView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" android:src="@drawable/
2316840057_7d197ddd0f_m"></ImageView>
<Spinner android:layout_width="wrap_content" android:id="@+id/
Spinner01" android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"></Spinner>
<Button android:layout_toRightOf="@+id/Spinner01"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/Button02"
android:text="Button02" android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"></Button>
<Button android:layout_toLeftOf="@+id/Spinner01"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/Button01"
android:text="Button01" android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"></Button>

</RelativeLayout>




I copied a sample jpg file in the the res/drawable directory and I
reference it from the main.xml, The 'layout' view of the main.xml
looks fine in eclipse (i can see the image i copied). But I cant
compile/run my program in the emulator because of errors in the R.java
file. Here is my activity:

import android.app.Activity;
import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.TextView;

public class FlashStart extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);
    }
}





Here is my R.java:

public final class R {
    public static final class attr {
    }
    public static final class drawable {
        public static final int 2316840057_7d197ddd0f_m=0x7f020000;
        public static final int icon=0x7f020001;
    }
    public static final class id {
        public static final int Button01=0x7f050004;
        public static final int Button02=0x7f050003;
        public static final int ImageView01=0x7f050001;
        public static final int RelativeLayout01=0x7f050000;
        public static final int Spinner01=0x7f050002;
    }
    public static final class layout {
        public static final int main=0x7f030000;
    }
    public static final class string {
        public static final int app_name=0x7f040001;
        public static final int hello=0x7f040000;
    }
}


The error I get is: Syntax error on token "2316840057", delete this
token.



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