Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm working through the book Beginning Android Programming with Android Studio, 4th Edition and I'm hoping the title is familiar to someone here.

I've gotten up to chapter 3, but now nearly every example (that we're optionally supposed to type in) that I've typed in won't build, because named resources specific to (I assume) the example are missing from the generated R.java file.

The book mentions no resources, so I'm hoping someone has had the same experience and resolved it, and can share with me how they did it.

BTW, if I download the code sample for that same chapter, it works fine, but I want to enter the code myself and get used to it, not just copy-paste.

What I have tried:

There is nothing I know or can guess how to do.
Posted
Updated 4-Dec-17 6:32am
v2
Comments
David Crow 4-Dec-17 8:34am    
Are you downloading it from here?

Have you checked with the book's author to see if some of the examples are known to be faulty?

What is the exact error you are facing?

Are you using Eclipse or Android Studio? If the latter, have you tried cleaning the project (to force the R.java file to be rebuilt)? Eclipse has this same functionality but it's been a while since I've used it.

"The book mentions no resources..."
I've never seen or coded an Android app that was void of any resources (i.e., they all have them).
Brady Kelly 4-Dec-17 9:02am    
I have asked about it on the Wrox forums; I have no contact info for the author. I never said the app is void of resources. I said there are missing resources and the book mentions no resources. I'm using Android Studio and will try the clean, thanks. I never knew about that.
Richard MacCutchan 4-Dec-17 8:48am    
You have most likely missed something that you need to type in. Check the res directory in your application source tree.
Brady Kelly 4-Dec-17 9:04am    
I have missed nothing; I have gone through the book's exercise 4 or 5 times, and how will looking at the res folder tell me what's supposed to be there. If I recognise something in res, I don't know if it's right or wrong, and the book gives no values for any resources.
Richard MacCutchan 4-Dec-17 10:46am    
Well without a copy of the book and sight of your code it is anyone's guess what the problem is. I suggest you post the code into your question and we may be able to suggest something.

1 solution

I got through the chapter 3 in question with downloaded code in the end. Chapter 4 includes instructions for adding a used resource, but no source code. I guess I just have to improvise at some places.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900