|
|
|
|
Re: Android apps help [message #1007201 is a reply to message #1007189] |
Mon, 04 February 2013 22:41 |
|
On 2/4/2013 2:24 PM, Tyler Mayoff wrote:
> When I try that it tells me that button.setOnClickListener(****(); says
> that it is unreachable code
This isn't a Java forum or an Android forum; you're problem here has
been Java all along.
The reason the compiler tells you that it's unreachable code (after
fixing your first problem, the missing semicolon) is because you've coded:
return true;
smack in the middle of the method (and before the whole Button thing).
If you're following a tutorial, you haven't "squinted" hard enough and
have inserted the return by mistake. Yup, it's a little bewildering at
first (the whole anonymous class thing is a fuzzy syntax when you're not
used to it).
A really good tutorial for Android stuff can be had at
http://www.vogella.de.
Best of luck.
|
|
|
Powered by
FUDForum. Page generated in 0.08762 seconds