| Author |
Android code to add two numbers
|
deepika deepi
Ranch Hand
Joined: Jan 23, 2012
Posts: 199
|
|
hi,
i am an beginner in android. i want to add two numbers in android, working on eclipse and i am getting an error in the code
error:
txtbox1= (EditText) findViewById(R.id.txtbox1);
button1 = (Button) findViewById(R.id.button1);
tv = (TextView) findViewById(R.id.lbl1);
txtbox2= (EditText) findViewById(R.id.txtbox2);
can we correct the error and make the code run?
|
 |
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
|
posted

0
|
|
Are you going to tell us what the error is, or are we supposed to guess? Is it that "R.id" does not exist? Maybe this helps: http://stackoverflow.com/questions/3721950/android-helloviews-spinner-tutorial-r-id-and-r-array-can-not-be-resolved
|
 |
Martin Vajsar
Bartender
Joined: Aug 22, 2010
Posts: 2330
|
|
|
Deepika, I've added code tags and indentation for you this time. You can do so yourself by using the Code button when writing your post.
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8435
|
|
Android questions are best asked on the android forum. In future please do take out time to CarefullyChooseOneForum
Moving...
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
 |
|
|
subject: Android code to add two numbers
|
|
|