[android-beginners] Re: R.java file is not getting updated
It won't rebuild unless you fix the error first. The error that is causing the R file to not be updated. Once you fix the error, the R file will automatically be generated. It might be a pain, but keep trying to solve it. If you have to (as a last resort, and the above ideas don't work), remove most of the code from the XML file, and comment out references in your java project files until R updates. Then add components one at a time until it doesn't update, then you know where the problem is. Best of luck. On Feb 3, 4:52 pm, Ashwani Rao wrote: > Hi Mark, > > Thanks for the idea. > I took the backupp of the R.java file and then did the build through > eclipse(Project -> build project) but the new file was not generated. > > Then i tried through the aapt tool. I got the following error. > > ->aapt c -M /bmc/test/workspace/CatchMe/AndroidManifest.xml -J > /bmc/test/workspace/CatchMe/src/Parry/com/src -A > /bmc/test/workspace/CatchMe/assets -S /bmc/test/workspace/CatchMe/res > (skipping backup file > '/bmc/test/workspace/CatchMeHarry/res/layout/main.xml~') > /bmc/test/workspace/CatchMeHarry/res/layout/main.xml:3: No resource > identifier found for attribute 'orientation' in package 'android' > > Any Idea on the above. > > Reagrds, > Ashwani > On 2/2/09, Mark Roberts wrote: > > > > > You can force a rebuild by deleting the R.java file > > > On Feb 2, 7:40 am, Ashwani Rao wrote: > > > Hi, > > > > There is no problem with the backgorund. > > > I am also not getting red line in my xml files. > > > > Should i run the aapt tool from command line ? > > > > Regards, > > > Ashwani > > > > On 2/2/09, madcoder wrote: > > > > > > > > android:layout_width="fill_parent" android:layout_height="fill_parent" > > > > android:layout_gravity="left" android:background="@drawable/ > > > > background"> > > > > > > > android:layout_height="wrap_content" android:text="New Match" > > > > android:layout_gravity="left"/> > > > > > > > android:layout_height="wrap_content" android:text="Resume Match" > > > > android:layout_gravity="left"/> > > > > > > > android:layout_width="fill_parent" > > > > android:layout_height="wrap_content" android:text="Demo Match" > > > > android:layout_gravity="left"/> > > > > > > > android:layout_width="fill_parent" > > > > android:layout_height="wrap_content" android:text="Instructions" > > > > android:layout_gravity="left"/> > > > > > > > > > Try to add > > > > > android: > > > > > To the First two button id's. > > > > > Are you getting any red squiggly lines anywhere in the xml file? Are > > > > you sure that 'background' has been imported properly into your > > > > project? > > > > > On Feb 2, 2:17 pm, Ashwani Rao wrote: > > > > > Hi, > > > > > > Please find the attached xml file. > > > > > I am using eclipse and tried to build the project through eclipes > > only. > > > > > > Thanks and Regrads, > > > > > Ashwani > > > > > > On 2/1/09, Kevin J. Brooks wrote: > > > > > > > This fixed my problem. Try building your project. > > > > > > > On Fri, 2009-01-30 at 07:57 -0500, Mark Murphy wrote: > > > > > > > Ashwani Rao wrote: > > > > > > > > HI, > > > > > > > > > I have created xml file for UI. > > > > > > > > I later added identifiers (@+/id) to few elements but the > > R.java > > > > file > > > > > > > > is not getting updated. > > > > > > > > There are many possible causes for this. Can you post the layout > > XML > > > > > > file? > > > > > > main.xml > > > > > 1KViewDownload --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R.java file is not getting updated
Hi Mark, Thanks for the idea. I took the backupp of the R.java file and then did the build through eclipse(Project -> build project) but the new file was not generated. Then i tried through the aapt tool. I got the following error. ->aapt c -M /bmc/test/workspace/CatchMe/AndroidManifest.xml -J /bmc/test/workspace/CatchMe/src/Parry/com/src -A /bmc/test/workspace/CatchMe/assets -S /bmc/test/workspace/CatchMe/res (skipping backup file '/bmc/test/workspace/CatchMeHarry/res/layout/main.xml~') /bmc/test/workspace/CatchMeHarry/res/layout/main.xml:3: No resource identifier found for attribute 'orientation' in package 'android' Any Idea on the above. Reagrds, Ashwani On 2/2/09, Mark Roberts wrote: > > > You can force a rebuild by deleting the R.java file > > On Feb 2, 7:40 am, Ashwani Rao wrote: > > Hi, > > > > There is no problem with the backgorund. > > I am also not getting red line in my xml files. > > > > Should i run the aapt tool from command line ? > > > > Regards, > > Ashwani > > > > On 2/2/09, madcoder wrote: > > > > > > > > > > > android:layout_width="fill_parent" android:layout_height="fill_parent" > > > android:layout_gravity="left" android:background="@drawable/ > > > background"> > > > > > android:layout_height="wrap_content" android:text="New Match" > > > android:layout_gravity="left"/> > > > > > android:layout_height="wrap_content" android:text="Resume Match" > > > android:layout_gravity="left"/> > > > > > android:layout_width="fill_parent" > > > android:layout_height="wrap_content" android:text="Demo Match" > > > android:layout_gravity="left"/> > > > > > android:layout_width="fill_parent" > > > android:layout_height="wrap_content" android:text="Instructions" > > > android:layout_gravity="left"/> > > > > > > > > Try to add > > > > > android: > > > > > To the First two button id's. > > > > > Are you getting any red squiggly lines anywhere in the xml file? Are > > > you sure that 'background' has been imported properly into your > > > project? > > > > > On Feb 2, 2:17 pm, Ashwani Rao wrote: > > > > Hi, > > > > > > Please find the attached xml file. > > > > I am using eclipse and tried to build the project through eclipes > only. > > > > > > Thanks and Regrads, > > > > Ashwani > > > > > > On 2/1/09, Kevin J. Brooks wrote: > > > > > > > This fixed my problem. Try building your project. > > > > > > > On Fri, 2009-01-30 at 07:57 -0500, Mark Murphy wrote: > > > > > > Ashwani Rao wrote: > > > > > > > HI, > > > > > > > > > I have created xml file for UI. > > > > > > > I later added identifiers (@+/id) to few elements but the > R.java > > > file > > > > > > > is not getting updated. > > > > > > > > There are many possible causes for this. Can you post the layout > XML > > > > > file? > > > > > > main.xml > > > > 1KViewDownload > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R.java file is not getting updated
Perhaps the xml file is not lowercases? When I changed to lowercase the problem is fixed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R.java file is not getting updated
You can force a rebuild by deleting the R.java file On Feb 2, 7:40 am, Ashwani Rao wrote: > Hi, > > There is no problem with the backgorund. > I am also not getting red line in my xml files. > > Should i run the aapt tool from command line ? > > Regards, > Ashwani > > On 2/2/09, madcoder wrote: > > > > > > android:layout_width="fill_parent" android:layout_height="fill_parent" > > android:layout_gravity="left" android:background="@drawable/ > > background"> > > > android:layout_height="wrap_content" android:text="New Match" > > android:layout_gravity="left"/> > > > android:layout_height="wrap_content" android:text="Resume Match" > > android:layout_gravity="left"/> > > > android:layout_width="fill_parent" > > android:layout_height="wrap_content" android:text="Demo Match" > > android:layout_gravity="left"/> > > > android:layout_width="fill_parent" > > android:layout_height="wrap_content" android:text="Instructions" > > android:layout_gravity="left"/> > > > > > Try to add > > > android: > > > To the First two button id's. > > > Are you getting any red squiggly lines anywhere in the xml file? Are > > you sure that 'background' has been imported properly into your > > project? > > > On Feb 2, 2:17 pm, Ashwani Rao wrote: > > > Hi, > > > > Please find the attached xml file. > > > I am using eclipse and tried to build the project through eclipes only. > > > > Thanks and Regrads, > > > Ashwani > > > > On 2/1/09, Kevin J. Brooks wrote: > > > > > This fixed my problem. Try building your project. > > > > > On Fri, 2009-01-30 at 07:57 -0500, Mark Murphy wrote: > > > > > Ashwani Rao wrote: > > > > > > HI, > > > > > > > I have created xml file for UI. > > > > > > I later added identifiers (@+/id) to few elements but the R.java > > file > > > > > > is not getting updated. > > > > > > There are many possible causes for this. Can you post the layout XML > > > > file? > > > > main.xml > > > 1KViewDownload --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R.java file is not getting updated
Hi, There is no problem with the backgorund. I am also not getting red line in my xml files. Should i run the aapt tool from command line ? Regards, Ashwani On 2/2/09, madcoder wrote: > > > android:layout_width="fill_parent" android:layout_height="fill_parent" > android:layout_gravity="left" android:background="@drawable/ > background"> > android:layout_height="wrap_content" android:text="New Match" > android:layout_gravity="left"/> > android:layout_height="wrap_content" android:text="Resume Match" > android:layout_gravity="left"/> > android:layout_width="fill_parent" > android:layout_height="wrap_content" android:text="Demo Match" > android:layout_gravity="left"/> > android:layout_width="fill_parent" > android:layout_height="wrap_content" android:text="Instructions" > android:layout_gravity="left"/> > > > Try to add > > android: > > To the First two button id's. > > Are you getting any red squiggly lines anywhere in the xml file? Are > you sure that 'background' has been imported properly into your > project? > > > > On Feb 2, 2:17 pm, Ashwani Rao wrote: > > Hi, > > > > Please find the attached xml file. > > I am using eclipse and tried to build the project through eclipes only. > > > > Thanks and Regrads, > > Ashwani > > > > On 2/1/09, Kevin J. Brooks wrote: > > > > > > > > > This fixed my problem. Try building your project. > > > > > On Fri, 2009-01-30 at 07:57 -0500, Mark Murphy wrote: > > > > Ashwani Rao wrote: > > > > > HI, > > > > > > > I have created xml file for UI. > > > > > I later added identifiers (@+/id) to few elements but the R.java > file > > > > > is not getting updated. > > > > > > There are many possible causes for this. Can you post the layout XML > > > file? > > > > > > > > main.xml > > 1KViewDownload > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R.java file is not getting updated
Try to add android: To the First two button id's. Are you getting any red squiggly lines anywhere in the xml file? Are you sure that 'background' has been imported properly into your project? On Feb 2, 2:17 pm, Ashwani Rao wrote: > Hi, > > Please find the attached xml file. > I am using eclipse and tried to build the project through eclipes only. > > Thanks and Regrads, > Ashwani > > On 2/1/09, Kevin J. Brooks wrote: > > > > > This fixed my problem. Try building your project. > > > On Fri, 2009-01-30 at 07:57 -0500, Mark Murphy wrote: > > > Ashwani Rao wrote: > > > > HI, > > > > > I have created xml file for UI. > > > > I later added identifiers (@+/id) to few elements but the R.java file > > > > is not getting updated. > > > > There are many possible causes for this. Can you post the layout XML > > file? > > > > main.xml > 1KViewDownload --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R.java file is not getting updated
Hi, Please find the attached xml file. I am using eclipse and tried to build the project through eclipes only. Thanks and Regrads, Ashwani On 2/1/09, Kevin J. Brooks wrote: > > > This fixed my problem. Try building your project. > > On Fri, 2009-01-30 at 07:57 -0500, Mark Murphy wrote: > > Ashwani Rao wrote: > > > HI, > > > > > > I have created xml file for UI. > > > I later added identifiers (@+/id) to few elements but the R.java file > > > is not getting updated. > > > > There are many possible causes for this. Can you post the layout XML > file? > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~--- http://schemas.android.com/apk/res/android"; android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="left" android:background="@drawable/background">
[android-beginners] Re: R.java file is not getting updated
This fixed my problem. Try building your project. On Fri, 2009-01-30 at 07:57 -0500, Mark Murphy wrote: > Ashwani Rao wrote: > > HI, > > > > I have created xml file for UI. > > I later added identifiers (@+/id) to few elements but the R.java file > > is not getting updated. > > There are many possible causes for this. Can you post the layout XML file? > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R.java file is not getting updated
This is the very problem I am having. Are you using Eclipse? On Fri, 2009-01-30 at 07:57 -0500, Mark Murphy wrote: > Ashwani Rao wrote: > > HI, > > > > I have created xml file for UI. > > I later added identifiers (@+/id) to few elements but the R.java file > > is not getting updated. > > There are many possible causes for this. Can you post the layout XML file? > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R.java file is not getting updated
Ashwani Rao wrote: > HI, > > I have created xml file for UI. > I later added identifiers (@+/id) to few elements but the R.java file > is not getting updated. There are many possible causes for this. Can you post the layout XML file? -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---