-2

i already posted this question earlier this week, and still no luck and no answer to why im getting this.

i cant even clean the project because i get this error:

[2012-07-22 19:34:09 - CannonGame] W/ResourceType( 2808): Bad XML block: header size 116 or total size 0 is larger than data size 0
[2012-07-22 19:34:09 - CannonGame] C:\Users\Gaming\workspace\CannonGame\res\menu\main.xml:2: error: Error: No resource found that matches the given name (at 'title' with value '@string/menu_settings').

someone tell me what to do! this is due tonight :/ ive been working on it all week and cant figure this out.

starscream_disco_party
  • 2,306
  • 5
  • 24
  • 42
anthony
  • 371
  • 3
  • 8
  • 20
  • It seems something in your resource folder might be amiss; I've had it give me strange messages when Windows has autogenerated files (thumbs.db) in my case. Can you post what your folder structure looks like? – Eagle Jul 23 '12 at 02:44
  • this class is twice a week, mon and wed, being due on monday i didnt have this problem the previous wed, so i emailed him. and as far as the folder structure: i got my res folder with 4 drawable-dpi/ldpi/mdpi/xhdp folders in them, layout folder with main.xml, menu folder with main.xml, values folder with dimens/strings/styles.xml, values-large folder with a dimens.xml, AndroidManifest.xml, a picture, proguard-project.txt and project.properties. – anthony Jul 23 '12 at 02:51
  • have you tried restarting eclipse? sometimes, this does a lot more good that it would seem. – Eagle Jul 23 '12 at 02:57
  • 1
    'No resource found that matches the given name (at 'title' with value '@string/menu_settings')' – CMA Jul 23 '12 at 02:58

1 Answers1

1

Well for the answer to this post, the error is saying that whichever resource is being referenced on line 2 of main.xml can't be found with the title set to the value stored in @string/menu_settings. Make sure that your references are correct.

As for Eclipse not being to resolve R.java into a variable, try to edit an XML file and then save the changes (even just a trailing whitespace at the end-of-file). That will rebuild the references and recompile R.java. If that doesn't work, go through all of the activities with this error and make sure that the R.java file that's being imported is your.package.name.R, rather than android.R.

starscream_disco_party
  • 2,306
  • 5
  • 24
  • 42
  • so i got most of the errors taken care of, doing all that ^^ but one more error left, i keep getting "raw cannot be resolved or is not a field". how do i fix that? – anthony Jul 23 '12 at 03:18
  • Thanks for accepting the answer! Maybe an upvote too? ;* So it looks like this is another issue with `R.java`. So you've gone through and made sure that the correct `R.java` file is being imported, `your.package.name.R`? Did you also make sure to delete any `import` statements for `import android.R`? If so, can you post the error from LogCat along with the relevant code for this problem? If this is a problem referencing a resource from `raw` are you using the path `project/res/raw` instead of `project/raw`? – starscream_disco_party Jul 23 '12 at 04:13