In my experience, when the R.java file cannot be created, it usually means a problem with one or more .xml files. It likely won't help to refresh/clean the project if a .xml file is in error, as the R.java file will still fail to get created.
Have you looked at the Problems tab?
Another thing to try is to open each (layout) .xml file and click the Graphical Layout tab. It will complain about stuff that the other tab will not.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
Thank you very much sir i have switched IDE's over to Eclipse Indigo and have same error. Its just the raw file only can you please help me resolve this error? Below is the code maybe you can show me where I went wrong seems like every ide I have this only error. Thank you for your input and can you please help me get past this.
When the following code runs, an exception occurs at the setImageResource line. When I debug it, the right after that line the debugger jumps to the finally part, and then it goes into some java code in Runtimeinit.java to a method called private static class UncaughtHandler implements Thread.UncaughtExceptionHandler If I remark the finally section, then the exception is not caught by the catch part?
Why isn't the catch part working? Isn't "catch (Exception ex)" supposed to catch any type of exception?
It was just a test code. I was more interested in understanding why the try/catch did not work. The imageView was less of a concern in this excercise.
Once I was able to trap the error , it turned out to be "not enough memory" because the bitmap I was using was too big.