选项项目选定区域mFirebaseAuth.signOut();
中无法访问的语句错误。
public boolean onOptionsItemSelected(MenuItem item) {
return super.onOptionsItemSelected(item);
switch (item.getItemId()) {
case R.id.sign_out_menu:
mFirebaseAuth.signOut();
Auth.GoogleSignInApi.signOut(mGoogleApiClient);
mUsername = ANONYMOUS;
startActivity(new Intent(this, SignInActivity.class));
return true;
default:
return super.onOptionsItemSelected(item);
}
}
答案 0 :(得分:1)
删除,
return super.onOptionsItemSelected(item);
答案 1 :(得分:-1)
在代码的这一行:
return super.onOptionsItemSelected(item);
删除单词“ return”,使您的新行显示如下:
super.onOptionsItemSelected(item);