Results 1 to 2 of 2

Thread: Android Help

  1. #1
    fresh83 is offline Member
    Join Date
    Dec 2009
    Rep Power

    Default Android Help

    So i decided to try my hand at my first app without guidance from a tutorial and as i expected its been less then a smooth process. The game when started will make one out of 3 buttons appear and give users a few seconds to press it and if they dont get it in over.

    theres more to it id like to add but, if i could just get that far with something compilable id be happy at this point and would work my way up from there. Heres what i came up with so far. Any tips/suggestions/critiques or noticeable errors would be helpful at this point. id even be willing to pay someone to guide me threw this.
    (i realize i only added one of the 4 buttons in this code but, the code from the first will just be duplicated 3 times once i get the first one up and running.)

    errors read as follows:
    Syntax error on token "void", @ expected
    Syntax error on token "while", invalid AnnotationName
    Syntax error, insert "Identifier (" to complete ConstructorHeaderName
    Syntax error, insert "interface Identifier" to complete InterfaceHeader

    Java Code:
    import java.util.Random;
    import android.os.CountDownTimer;
    import android.widget.Button;
    protected static void start() {
    	  	   boolean gameIsAlive = true;
    	  	   Random dice = new Random();
    	  	   int nextCommand;
    	  	   while(gameIsAlive) {
    	  		   nextCommand = 1+dice.nextInt(4);
    	  			      new CountDownTimer(30000,1000) {
    	  			         public void onTick(long millisUntilFinished) {
    	  			           //this is where i think i need to insert the button and animation to go with it but,
    	  			           //i need it to only appear when this method is called
    	  			          mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);
    	  			          Button bTutorial1 = (Button) findViewById(;
    	  			          bTutorial1.setOnClickListener(new View.OnClickListener() { 
    	  			            public void onClick(View v) {
    	  			              // TODO Auto-generated method stub
    							public void onFinish() {
    								// TODO Auto-generated method stub
    							}; }; }; }; }

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    On vacation
    Rep Power


    Please post a link to the other site where this problem was solved.

Similar Threads

  1. android sdk
    By aizen92 in forum Android
    Replies: 2
    Last Post: 02-21-2011, 11:28 PM
  2. Android USB
    By Blackberrylerner in forum Android
    Replies: 0
    Last Post: 01-15-2011, 06:05 AM
  3. Android
    By sspkiet in forum Android
    Replies: 1
    Last Post: 09-03-2010, 01:14 AM
  4. add Android platform?
    By mysystem in forum NetBeans
    Replies: 0
    Last Post: 08-19-2009, 11:24 AM
  5. Android on Eclipse 3.2
    By aibtus in forum Eclipse
    Replies: 0
    Last Post: 04-08-2008, 11:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts