Buggy code:
public class LoginActivity extends AppCompatActivity implements LoaderCallbacks < Cursor > { private static final int REQUEST_READ_CONTACTS = 0 ; private LoginActivity . UserLoginTask mAuthTask = null ; private AutoCompleteTextView mUserName ; private EditText mPasswordView ; private View mProgressView ; private View mLoginFormView ; private GoogleApiClient client ; public static boolean isLocalDatastoreEnabled = false ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_login ) ; if ( ( LoginActivity . isLocalDatastoreEnabled ) == false ) { Parse . enableLocalDatastore ( this ) ; Parse . initialize ( this ) ; LoginActivity . isLocalDatastoreEnabled = true ; } ParseUser . enableAutomaticUser ( ) ; ParseACL defaultACL = new ParseACL ( ) ; setDefaultACL ( defaultACL , true ) ; mUserName = ( ( AutoCompleteTextView ) ( findViewById ( email ) ) ) ; populateAutoComplete ( ) ; mPasswordView = ( ( EditText ) ( findViewById ( password ) ) ) ; mPasswordView . setOnEditorActionListener ( new TextView . OnEditorActionListener ( ) { @ Override public boolean onEditorAction ( TextView textView , int id , KeyEvent keyEvent ) { if ( ( id == ( id . login ) ) || ( id == ( EditorInfo . IME_NULL ) ) ) { attemptLogin ( ) ; if ( ( ( mAuthTask ) != null ) && ( ( mAuthTask . isAbleToLogin ) == true ) ) { <START_BUG> startActivity ( new Intent ( LoginActivity . this , MyEvent . class ) ) ; <END_BUG> } } return false ; } } ) ; Button mEmailSignInButton = ( ( Button ) ( findViewById ( email_sign_in_button ) ) ) ; mEmailSignInButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View view ) { attemptLogin ( ) ; } } ) ; Button mSignUpButton = ( ( Button ) ( findViewById ( registerIn ) ) ) ; mSignUpButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { startActivity ( new Intent ( LoginActivity . this , CreateProfile . class ) ) ; } } ) ; mLoginFormView = findViewById ( login_form ) ; mProgressView = findViewById ( login_progress ) ; client = new GoogleApiClient . Builder ( this ) . addApi ( API ) . build ( ) ; } public void goToMainActivity ( View view ) { } private void populateAutoComplete ( ) { } private boolean mayRequestContacts ( ) { } @ Override public void onRequestPermissionsResult ( int requestCode , @ NonNull String [ ] permissions , @ NonNull int [ ] grantResults ) { } private void attemptLogin ( ) { } private boolean isEmailValid ( String email ) { } private boolean isPasswordValid ( String password ) { } @ TargetApi ( VERSION_CODES . HONEYCOMB_MR2 ) private void showProgress ( final boolean show ) { } @ Override public Loader < Cursor > onCreateLoader ( int i , Bundle bundle ) { } @ Override public void onLoadFinished ( Loader < Cursor > cursorLoader , Cursor cursor ) { } @ Override public void onLoaderReset ( Loader < Cursor > cursorLoader ) { } private void addEmailsToAutoComplete ( List < String > emailAddressCollection ) { } @ Override public void onStart ( ) { } @ Override public void onStop ( ) { } private interface ProfileQuery { String [ ] PROJECTION = new String [ ] { Email . ADDRESS , Email . IS_PRIMARY } ; int ADDRESS = 0 ; int IS_PRIMARY = 1 ; } public class UserLoginTask extends AsyncTask < Void , Void , Boolean > { private final String mEmail ; private final String mPassword ; private boolean isAbleToLogin = false ; UserLoginTask ( String email , String password ) { } @ Override protected Boolean doInBackground ( Void ... params ) { } @ Override protected void onPostExecute ( final Boolean success ) { } @ Override protected void onCancelled ( ) { } } }

Fix:
startActivity ( new Intent ( LoginActivity . this , MyEvents . class ) ) ;