• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Android Notepad Example?

Having completed a few "Hello World" type apps for examples, I wanted to move on to a notepad style sample. Especially since my MyTouch doesn't have a notes application.

Notepad Tutorial | Android Developers

I - however - get many errors when loading even the solution. It keeps saying R. doesn't exist.

notepad.png


Any ideas why this is? I don't notice a forum on the Developer Forums.
 
It was called notes_list in the example I followed -- they may have changed it since. Make sure you actually have the xml file in the right place and that it's saved (otherwise it won't automatically add the correct ID).

If that doesn't work try project -> clean and there is another good one, something like "fix problems with project," but I can't find the menu option right now.

ctrl-shift-o is always a good one to try, but I don't think that's the case here.
 
Upvote 0
A couple of things without seeing your full code:
1. I find it best to always Save, Refresh and Clean
2. After an error - delete the Out file that gets created (it will show up in the folder with the file that caused it (usually one of the xml's)
3. Don't Import the R.class file
4. Eclipse is very picky about syntax and when using the auto/suggestion, as in findViewById(R.id.layout) - type it in rather than using the suggestion - sometimes (not always) there seems to be a hidden character - trust me, I discoverer this many times. It's a bug.
5. Regarding your specific problem: again back to 'syntax' Don't use: upper case, numbers or ANYTHING other than lowercase and no symbols or dashes or underlines. Especially for resources.
 
Upvote 0
I am having the same problem and I also do not have the R.java file in /gen. My understanding is that the Android plugin for Eclipse is supposed to auto generate this file, it appears though that it has not. Is there a way to force Eclipse to generate this file? Thanks.

P.S.
I tried using the Android Tools-> Fix Project Properties, this did nothing. I aslo tried building the Solution, but there still was no /gen/R.java.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones