Logging into google play services crashing my game.

there are no issues building my games apk file. i got new resources from the google developers console. my app is “ready to publish” but still set to test. when i install the apk on my phone it crashes and closes as soon as it tries to sign into google the code im using is as follows. If anyone can help my figgure out why my game is crashing it would be much appriciated.

using UnityEngine;
using UnityEngine.SceneManagement;
using GooglePlayGames;

public class Control : MonoBehaviour {

public string AKB = "CgkI96qIrZYMEAIQBQ";
public string ALVL99 = "CgkI96qIrZYMEAIQAQ";
public string AAHW = "CgkI96qIrZYMEAIQAg";
public string ABW = "CgkI96qIrZYMEAIQAw";
public string AFW = "CgkI96qIrZYMEAIQBA";
public string GLB = "CgkI96qIrZYMEAIQBg";
public bool LoggedInToGoogle = false;

void Start()
{
    PlayGamesPlatform.Activate();
    if (!LoggedInToGoogle)
    {
        Social.localUser.Authenticate((bool success) =>
        {
            LoggedInToGoogle = true;
        });
    }

There seems to be many reasons why this happens. For those who still have this problem and come across this post, try the following:

  1. Make sure you followed every step in the setup portion of the Unity Play Services plugin on GitHub (Play Services Unity Plugin)
  2. Use the APK that is signed through the Play Console, not the APK that you build through Unity
  3. Make sure your email is entered in the play services settings and that you allow Alpha / Beta testers access to play services features
  4. Make sure everything is up-to-date (For Unity 2018.2, Visual Studio was having some dependency issues with Text Mesh Pro, so make sure your IDE and other tools are updated as well)
  5. DO NOT USE GRADLE. This was the reason my app kept crashing. I was using Gradle to build my project. Once I changed my build settings to internal, everything worked as expected.

Hope this helps some people! I tried some other steps I found on other forums and posts, but I cannot remember what those are right now. At least I was able to post a solution (Internal build) that I did not find anywhere else.

just in case anyone else finds this and needs help… the answer was in the google developers console, game services, my email wasn’t entered. it was in closed alpha test list but still needed it in the game services i guess.