no viable alternative at input ')'

Former Member
Former Member
Hello,

I'm seeing red errors briefly in my Eclipse console. But they disappear when the Simulator starts up and my app runs as I expect it to in the simulator.

BUILD: ERROR: C:\Garmin\Projects\WhiteWatch\source\AMazeingView.mc:144: no viable alternative at input ')'
BUILD: ERROR: C:\Garmin\Projects\WhiteWatch\source\AMazeingView.mc:146: missing '}' at 'else'
BUILD: ERROR: C:\Garmin\Projects\WhiteWatch\source\AMazeingView.mc:151: extraneous input 'dc' expecting {'}', 'using
... etc


I'm wondering if it's to do with my IF statements. Are we allowed to use the || or operator like in Java? They seem to work ok. The line in question, doesn't seem to have any relationship to the error message, i.e. if I insert a blank line so that 144 is blank, it still reports the same error on the same line number.

If I leave the simulator running, when I launch my app, no errors are shown. It's only when I launch my app when the simulator is not yet running do I see these messages.

Any ideas please?
  • Can you provide source so someone could try to reproduce it and produce a test case?
  • Former Member
    Former Member over 8 years ago
    eeek. I might have to tidy up my spaghetti code first. ;-)

    Thanks, Travis.

    Actually, I think I have found the issue. For some reason my Eclipse console is shooting up to the top of the page and I'm seeing earlier error messages. I quickly hit CTRL-A and then CTRL-C before the console disappeared and pasted it so I could read it. Scrolling to the bottom showed no errors.

    It's interesting that the console output in Eclipse disappears when the Simulator is launched and is replaced by:
    Found Transport: tcp
    Connecting...
    Connecting to device...
    Device Version 0.1.0
    Device id 1 name "A garmin device"
    Shell Version 0.1.0
    Copying file.... 1% complete
    ...., etc.