I tried the google developer documentation and tried sign-in for my app. The code is copied from the git with added codes from the documentation. and defined in LoginAc
While you calling signIn() method ,method can't find startActivityForResult. where you got error.
You need to @override startActivityForResult for LoginActivity.
Add below code in you LoginActivity.
Code:
@Override
public void startActivityForResult(Intent intent, int requestCode) {
super.startActivityForResult(intent, requestCode);
}