playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.45k stars 962 forks source link

the plugin 9.41 causing the app to crash immediately #1974

Open mobeenk opened 6 years ago

mobeenk commented 6 years ago

I've been trying to find a solution for this since 2 weeks I'm using Unity v5.4 with this plugin this is the code void Start() { PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build(); PlayGamesPlatform.InitializeInstance(config); PlayGamesPlatform.DebugLogEnabled = true; PlayGamesPlatform.Activate(); signin(); public void signin() { PlayGamesPlatform.Instance.Authenticate // Social.localUser.Authenticate ((bool success) => { if (success) { Debug.Log("yes"); } else if (!success) { Debug.Log("no"); } }); }

the crash happened at the signin() part so basically authinticating is crashing I tried the solution in here https://github.com/playgameservices/play-games-plugin-for-unity/issues/1604 it didn't work I also change the SHA-1 certificate and modified the androidManifest file still nothing worked out

Can someone please tell me what's the solution for this I'm desperate !!!

xenonsin commented 6 years ago

1935

Check this out. It seems that in GPGS 9.41 Unity isn't picking up the google generated AndroidManifest file so it omits the AppID from the final AndroidManifest. You can verify this by Analyzing your apk using Android Studio.

mobeenk commented 6 years ago

What the solution for this? when I downgraded to plugin version 9.33 I get no crash and I can access leaderboards and achievments but the code for making progress doesn't work why?

xenonsin commented 6 years ago

If you follow the thread, there is an error in 9.41 where Unity autogenerates an AndroidManifest without an AppID, so you're going to have authentication errors. The solution is to override the manifest so it contains the app id.

blookmaker commented 6 years ago

Hi i was struggling with the exact same problem with the exact same version of unity3D v5.4 , i have just switched to 5.6 and guess what ? it's work now , if you don't want to struggle with manifests files , just switch to 5.6 ,