나는 Wrox Professional Android 2 Application Development 책을 사용하여 Android에서 블루투스 프로그래밍을 배우고 있습니다.Android : 모니터링 Bluetooth 검색 -이 컴파일 오류의 의미는 무엇입니까?
BroadcastReceiver discoveryMonitor = new BroadcastReceiver() {
String dStarted = BluetoothAdapter.ACTION_DISCOVERY_STARTED;
String dFinished = BluetoothAdapter.ACTION_DISCOVERY_FINISHED;
@Override
public void onReceive(Context context, Intent intent) {
if (dStarted.equals(intent.getAction())) {
// Discovery has started.
Toast.makeText(getApplicationContext(),
"Discovery Started...", Toast.LENGTH_SHORT).show();
}
else if (dFinished.equals(intent.getAction())) {
// Discovery has completed.
Toast.makeText(getApplicationContext(),
"Discovery Completed...", Toast.LENGTH_SHORT).show();
}
}
};
registerReceiver(discoveryMonitor,
new IntentFilter(dStarted));
registerReceiver(discoveryMonitor,
new IntentFilter(dFinished));
... 그리고 내가 할 마지막에 호출 registerReceiver 두의 각 : 발견 모니터 예 (페이지 432)이 코드를 가지고있다. . .
이 토큰에구문 오류가 AnnotationName 대신
구문 오류, 완료 "유형 VariableDeclaratorId"를 삽입 예상 FormalParameterList
annotationName와 잘못 여기에 무엇을 어떻게 무슨 일이야?
미리 감사드립니다.