Reputation: 109
Okay, sorry for asking this question. I have no idea how to solve this problem. I am creating a new project in eclipse, put some XML files in res/layout folder, and then drag an drop existing java files to src folder. I tried to generate R.java by cleaning the project and then these error messages appear:
[2014-02-10 18:28:01 - EventPlanner] W/ResourceType( 7228): ResXMLTree_node size 0xffffffff or headerSize 0xffff is not on an integer boundary.
[2014-02-10 18:28:01 - EventPlanner] E:\Andika\workspaces\EventPlanner\res\layout\activities_list.xml:6: error: Error: No resource found that matches the given name (at 'id' with value '@id/activity_id').
[2014-02-10 18:28:01 - EventPlanner] E:\Andika\workspaces\EventPlanner\res\layout\activities_list.xml:7: error: Error: No resource found that matches the given name (at 'id' with value '@id/chk_box').
[2014-02-10 18:28:01 - EventPlanner] E:\Andika\workspaces\EventPlanner\res\layout\activities_list.xml:10: error: Error: No resource found that matches the given name (at 'id' with value '@id/res_text').
.....
And R.java file wasn't generated. I have tried to close the eclipse and then re open again but it doesn't solve my problem. Did I miss something? Thank you
Edit: this is one of my XML layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:background="@color/black" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="vertical" android:paddingLeft="10.0dip" android:paddingTop="10.0dip" android:paddingRight="10.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:background="@drawable/cell_shape_login_form" android:layout_width="fill_parent" android:layout_height="wrap_content">
<ImageView android:layout_gravity="center" android:id="@id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_action_person" />
<EditText android:textColor="@color/black" android:id="@id/username" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="Username" android:ems="20" android:layout_weight="1.0" android:inputType="textPersonName" />
</LinearLayout>
</LinearLayout>
<LinearLayout android:orientation="vertical" android:paddingLeft="10.0dip" android:paddingTop="5.0dip" android:paddingRight="10.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="horizontal" android:background="@drawable/cell_shape_login_form" android:layout_width="fill_parent" android:layout_height="wrap_content">
<ImageView android:layout_gravity="center" android:id="@id/imageView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_action_secure" />
<EditText android:textColor="@color/black" android:id="@id/password" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="Password" android:ems="20" android:layout_weight="1.0" android:inputType="textPassword">
<requestFocus />
</EditText>
</LinearLayout>
</LinearLayout>
<TextView android:textColor="@color/BlueDefault" android:id="@id/TextView01" android:paddingLeft="10.0dip" android:paddingRight="10.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Login as" />
<LinearLayout android:orientation="vertical" android:paddingLeft="10.0dip" android:paddingTop="5.0dip" android:paddingRight="10.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<Spinner android:entries="@array/account_type" android:id="@id/spinner1" android:background="@drawable/cell_shape_login_form" android:paddingLeft="10.0dip" android:paddingTop="5.0dip" android:paddingRight="10.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:prompt="@string/manager" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:paddingLeft="5.0dip" android:paddingRight="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" style="?android:attr/buttonBarStyle">
<Button android:id="@id/cancel" android:background="@drawable/button_clicked" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="Cancel" android:layout_weight="0.5" style="?android:attr/buttonBarButtonStyle" />
<Button android:id="@id/signin" android:background="@drawable/button_clicked" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="Sign in" android:layout_weight="0.5" style="?android:attr/buttonBarButtonStyle" />
</LinearLayout>
<TextView android:textColor="@color/BlueDefault" android:id="@id/signup" android:paddingLeft="10.0dip" android:paddingRight="10.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Don't have any account? click here to sign up" />
</LinearLayout>
Upvotes: 1
Views: 928
Reputation: 23787
W/ResourceType( 3640): ResXMLTree_node size 0x6f72646e or headerSize 0x6100 is not on an integer boundary.
was shown to me because I had an ampersand in the URL within strings.xml
The solution is to replace the &
by %26
Upvotes: 0
Reputation: 2641
Where ever you getting the error in xml file.
1) Just delete that whole id and rename it again with new id name.
2) I can see you are also getting errors while setting styles and background resources. just delete and define it again in your xml file and clean your project.
I hope this resolves your problem.....
Upvotes: 1
Reputation: 4255
Please try this code :
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="5.0dip"
android:paddingLeft="10.0dip"
android:paddingRight="10.0dip"
android:paddingTop="10.0dip" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/cell_shape_login_form" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_person" />
<EditText
android:id="@+id/username"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:ems="20"
android:hint="Username"
android:inputType="textPersonName"
android:textColor="@color/black" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="5.0dip"
android:paddingLeft="10.0dip"
android:paddingRight="10.0dip"
android:paddingTop="5.0dip" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/cell_shape_login_form"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_secure" />
<EditText
android:id="@+id/password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:ems="20"
android:hint="Password"
android:inputType="textPassword"
android:textColor="@color/black" >
<requestFocus />
</EditText>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10.0dip"
android:paddingRight="10.0dip"
android:text="Login as"
android:textColor="@color/BlueDefault" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="5.0dip"
android:paddingLeft="10.0dip"
android:paddingRight="10.0dip"
android:paddingTop="5.0dip" >
<Spinner
android:id="@+id/spinner1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/cell_shape_login_form"
android:entries="@array/account_type"
android:paddingBottom="5.0dip"
android:paddingLeft="10.0dip"
android:paddingRight="10.0dip"
android:paddingTop="5.0dip"
android:prompt="@string/manager" />
</LinearLayout>
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="5.0dip"
android:paddingRight="5.0dip" >
<Button
android:id="@+id/cancel"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0.0dip"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="@drawable/button_clicked"
android:text="Cancel" />
<Button
android:id="@+id/signin"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0.0dip"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="@drawable/button_clicked"
android:text="Sign in" />
</LinearLayout>
<TextView
android:id="@+id/signup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10.0dip"
android:paddingRight="10.0dip"
android:text="Don't have any account? click here to sign up"
android:textColor="@color/BlueDefault" />
Upvotes: 0