android temperature tutorial

61 views
Skip to first unread message

iamalex

unread,
Jan 19, 2011, 2:05:39 PM1/19/11
to vogella
Working on the android temperature tutorial (the first one) and
getting errors in convert.java

In the following lines I'm getting "EditText01, Button01,
RadioButton01, RadioButton01" cannot be resolved or is not a field.

I put in exactly as tutorial said and main is fine, shows no errors.

Can someone please help.

thanks....alex

code where prolbmes show:


text = (EditText) findViewById(R.id.EditText01);

case R.id.Button01:
RadioButton celsiusButton = (RadioButton)
findViewById(R.id.RadioButton01);
RadioButton fahrenheitButton = (RadioButton)
findViewById(R.id.RadioButton02);

Lars Vogel

unread,
Jan 19, 2011, 4:16:43 PM1/19/11
to vog...@googlegroups.com
Did you run Project -> Clean?

2011/1/19 iamalex <iam...@charter.net>

--
You received this message because you are subscribed to the Google Groups "vogella" group.
To post to this group, send email to vog...@googlegroups.com.
To unsubscribe from this group, send email to vogella+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vogella?hl=en.




--
Lars
http://www.vogella.de - Tutorials about Java, Eclipse and Web programming
http://www.twitter.com/vogella - Lars on Twitter

Russell Bateman

unread,
Jan 19, 2011, 3:11:19 PM1/19/11
to vog...@googlegroups.com
You have to make certain you get the right R class. That's one of the
initially perplexing things about Android tutorials. You might get some
help reading this:

http://www.javahotchocolate.com/tutorials/android.html#r-java

Lars Vogel

unread,
Jan 19, 2011, 4:23:31 PM1/19/11
to vog...@googlegroups.com
Hi Russel,

Thanks for your extension of my Android Tutorial. I think the following is funny: Quote: "As his expression is succinct and sometimes lacking in explanation" :-)

Cheers, Lars



2011/1/19 Russell Bateman <ru...@windofkeltia.com>
--
You received this message because you are subscribed to the Google Groups "vogella" group.
To post to this group, send email to vog...@googlegroups.com.
To unsubscribe from this group, send email to vogella+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vogella?hl=en.

Russell Bateman

unread,
Jan 19, 2011, 4:52:03 PM1/19/11
to vog...@googlegroups.com
I especially meant no insult. Your tutorials have been very important to me. Writing an article helps me to learn something well. I hit on the idea of "reviewing" your tutorial giving me a place to go back to if I get stuck. Sometimes I can refer others there if there's a specific point.

I wrote an article on servlets, JSPs and setting up and using Eclipse three years ago when I was learning to do such things. The Eclipse community published it. To write such a tutorial is a great deal of work, as you well know. And only to rewrite what you've already done so well seems pointless. So, I'm not going to write a tutorial on Android, REST, JSF (maybe not, I'm still thinking about it), etc. since it's already been done so well by you.

Yes, I'll submit suggestions and corrections to you. I have once or twice, but it's true I haven't made a habit of it.

My Android article already needs to be rewritten. I've learned a lot since I wrote it.

Very best regards,

Russ

Lars Vogel

unread,
Jan 19, 2011, 4:56:46 PM1/19/11
to vog...@googlegroups.com
Hi Russ,

no worry, no insult taken. :-)

I really like your addition and I think it is really cool that you extend my explanation. I also try to keep my tutorials as good as my time permits and therefore I'm happy if I see feedback on them

Thanks again.

Best regards, Lars

Lars Vogel

unread,
Jan 19, 2011, 5:04:36 PM1/19/11
to vog...@googlegroups.com
Bye the way: I have now a small familiy of Android tutorials which you find here: http://www.vogella.de/android.html


2011/1/19 Lars Vogel <lars....@googlemail.com>

James Steiner

unread,
Jan 20, 2011, 6:16:34 PM1/20/11
to vogella
Hello, I think Im getting the same problem as Alex. Everywhere "text"
is used, an error is displayed, saying "text cannot be resolved." or
"text cannot be resolved to a variable".

I have tried Project>Clean... have read through Russel's article and
I'm still confused.

Lars Vogel

unread,
Jan 23, 2011, 2:11:48 PM1/23/11
to vog...@googlegroups.com
Hi Jamens,

can you post the coding where you see errors? Please also post your main.xml.

Best regards, Lars

2011/1/21 James Steiner <jamess...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "vogella" group.
To post to this group, send email to vog...@googlegroups.com.
To unsubscribe from this group, send email to vogella+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vogella?hl=en.

Reply all
Reply to author
Forward
0 new messages