-1
ImageView ivCamera;

FlashLightControl = (Button)findViewById(R.id.flashcontrol);
ivCamera = (ImageView)findViewById(R.id.iv_camera);

Syntax error on token ";" ,, expected.


- Multiple markers at this line
- Syntax error on token ")", { expected after    this token
- Syntax error, insert ";" to complete       FieldDeclaration
- Syntax error on token ".", ... expected
- Return type for the method is missing

Syntax error, insert "}" to complete MethodBody

4

2 回答 2

0

您需要命名 FlashLightControl 变量:

FlashLightControl flc = (Button)findViewById(R.id.flashcontrol);
ivCamera = (ImageView)findViewById(R.id.iv_camera);

另一方面,是否Button可以将其视为FlashLightControl实例?

也许你想要

Button flashLightControl = (Button)findViewById(R.id.flashcontrol);
于 2013-03-26T13:31:19.033 回答
0

您似乎缺少对象引用。请更改以下代码行:

FlashLightControl = (Button)findViewById(R.id.flashcontrol);

对此:

FlashLightControl flashControlName = (Button)findViewById(R.id.flashcontrol);

但是,这仅在FlashLightControl是类型Button或与之兼容时才有效。

希望这可以帮助。

于 2013-03-26T13:31:21.893 回答