Firebase Google+ Api error : ApiException: 10:

Before I ask the question let me mention that my code works as a seperate app, but once I impliment the code into a pre-existing app that I have made I get the exception:

com.google.android.gms.common.api.ApiException: 10:

I will include my working code, as well as the once that will not work. But basically, my Logcat detects the problem to be at this line:

Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);

Now I appreciate all possible help, but let me tell you a few that I think are not correct. My app is not released. I did not need a SHA key or any kind of authentication when I used a mock app to test the API.But basically, I found that once I put the same code in a preexisting application, I am getting these problems. Also, I have made sure all of my imports are valid.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    // Here is where I set up my google API.
    GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
            .requestIdToken(getString(R.string.default_web_client_id))
            .requestEmail()
            .build();
    mGoogleSignInClient = GoogleSignIn.getClient(this, gso);

    mAuth= FirebaseAuth.getInstance();


    SignInButton googleSignIn= findViewById(R.id.google_sign_in_button);
    googleSignIn.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            Toast.makeText(MainActivity.this,"ButtonPressed", Toast.LENGTH_SHORT).show();
            signIn();
        }
    });
}


@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);
    if (requestCode == RC_SIGN_IN) {
        // Here is where my Logcat tells me the problem is at.
        Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
        try {
            // Google Sign In was successful, authenticate with Firebase
            GoogleSignInAccount account = task.getResult(ApiException.class);
            firebaseAuthWithGoogle(account);
        } catch (ApiException e) {
            // Google Sign In failed, update UI appropriately
            Log.w(TAG, "Google sign in failed", e);
            // ...
        }
    }
}

private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {
    Log.d(TAG, "firebaseAuthWithGoogle:" + acct.getId());

    AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);
    mAuth.signInWithCredential(credential)
            .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
                @SuppressLint("ShowToast")
                @Override
                public void onComplete(@NonNull Task<AuthResult> task) {
                    if (task.isSuccessful()) {
                        // Sign in success, update UI with the signed-in user's information
                        Log.d(TAG, "signInWithCredential:success");
                        user = mAuth.getCurrentUser();
                        updateUI(user);
                        Log.d(TAG, name+email+phone);
                    } else {
                        // If sign in fails, display a message to the user.
                        Log.w(TAG, "signInWithCredential:failure", task.getException());
                    }
                }
            });
}

// Apk of working separate app. My APK

Here is the full error on logcat enter image description here