Skip to content Skip to sidebar Skip to footer

Syntax Error On Tokens, Constructorheadername Expected Instead & Syntax Error On Token "(", < Expected

I'm getting two errors stating Syntax error on tokens, ConstructorHeaderName expected instead & Syntax error on token '(', < expected on the line: mTM.listen(callListener,

Solution 1:

The line

mTM.listen(callListener, PhoneStateListener.LISTEN_CALL_STATE);

is not included in any method. You should put this in the constructor(which seems like what you want) or a regular method.

Solution 2:

mTM.listen(callListener, PhoneStateListener.LISTEN_CALL_STATE);

Should be inside a method, not directly inside class. Refer this question for example implementation.

Post a Comment for "Syntax Error On Tokens, Constructorheadername Expected Instead & Syntax Error On Token "(", < Expected"