Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved Google play Services doesnt work! Sign in and leaderboard are not showing

Discussion in 'Android' started by korotaevnikita73, Jan 17, 2022.

  1. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    Hello guys, I have a massive issue that I want to fix. The thing is that I tried to add a leaderboard to my game with Google Play Services, I imported a plugin from github version 10.14 and created all the needed authenticators, then I pasted the infromation into plugin and wrote a script.

    But literally nothing is happening, like there is no plugin and no scripts, its not authentificating (and because of this my LB doesnt show up). I dont know what to do, I read a lot of threads about this but nothing worked. I Imported some plugins to my Android SDK, I tried different scripts and builded my game many times. Google Play Services doesnt even show up. The only reason I can imagine is thats something wrong with my SHAA, because i didnt take it from cmd, i just uploaded a beta version of my game and it automatically was in my configuration window ( when I was creating a oauth 2.0 ).

    What can I do to understand whats the problem and why nothing is working?
    Any help is appricated!!!
    devenv_ZrUTuyQfCh.png Unity_VgTgjcVYb2.png
     
  2. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,853
    Cross check once if you have stripping level other than Low (I guess you need to follow proguard steps if you have stripping other than low enabled for gpgs).
     
  3. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    Hi! My stripping level was on minimum. I set it on the low and unfortunately nothing changed. Do you think the problem can be with my SHAA key? I didnt take it from my cmd with the command, it actually was automatically set when I uploaded a first .aab file. Please keep in touch with me because I have nobody to ask and I really want to fix this. Maybe I should try to set older plugin?
    Thanks for your reply :D
     
  4. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,853
    SHA can be an issue for login but you mentioned as if there was no operation. Even for sign-in failed case(SHA issue), you get a loading screen and later it fails
    Once check the following
    1. Make sure a tester email is added to the testers list of Grow -> Play Services section in google play console
    2. Use the same tester email registered in step 1 while testing!
     
  5. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    So basically I spent hours doing something about it. I set the nearby connection it was empty, I set the game mode in OAuth contest screen to publishing instead of testing, I added plugin GPS and Android 6.0 to my SDK in Android manager, I created a new Cloud project and connected it to console. I set my tester email everywhere, its only 1. Unfortunately nothing worked, I dont really know what could be the problem. Even people who do youtube guides doing almost nothing just the main things, HOW DOES IT WORK FOR THEM?? I dont understand. I just want my game to be complete. Please somebody help me with this
    I just want to see any progress, something like an initialazing or sign in screen but its just nothing lmao
     
  6. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,853
    Unfortunately, I can't dig much into it as it's an external plugin.
    99% of our plugin users get mainly the below errors and I presented the same
    1. Wrong SHA mismatch (They often miss adding SHA of debug build and add only production sha in google play)
    2. Use wrong tester account which fails
    3. Stripping to higher levels leading to unexpected stripping


    Did you try posting on their github issues page?
    Also, enable development build and pass me "complete" logcat log to see if its spitting any info.
     
  7. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    I didnt try to post my problem on github issue page because I saw that there was no response in threads for weeks. I actually messed up my SHA key, I found it different when I got it from cmd from the key I was given by default. But nothing changed lol. I changed key and updated credentials and nothing still shows up. This is what I get in logs - everything is doing its function and then this error. I dont really know what that means. I will put the screenshot of the first log error at start, error after everything in leaderboard were supposed to be working and my srcipts with leaderboard. Unity_GxZnWPQnaB.png devenv_T4U6rX1RLM.png Unity_Eyijcz3eWc.png
     
  8. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    And I also have this warning when I try to force resolve the game, it stops on 100% and gives me a warning upload_2022-1-20_22-22-53.png
    I did a lot of things, for example everything from this like a korean thread https://sunpil.tistory.com/326 and many others but nothing still working :) Please help me, its almost a week I want to set all this up
     
  9. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,853
    The error shows the required classes are not found. Share me a screenshot of Assets/Plugins/Android folder or Assets/Plugins/Android/maintemplate.gradle file if it exists.
     
  10. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    I think this theme on official GPS documentation may be the problem. I actually did nothing what they say to do in "configure your app".
    I will attach the screenshots of my 2 build gradle files that I found im my game foulder and the documentaion screen.
    I did input the strings with this in my build gradle by myself and nothing changed, maybe I put this in the wrong build.gradle? Also the screenshot of my android plugin folder, and i dont have maintemplate.gradle file, only AndroidManifest and Proguard-user.
    And there is one more strange thing, when i add mavenCentre() to repositories (the last screenshot) my build fails, i added a comment. Maybe its not even the case and doing this is not what i need lol.
    chrome_suYMH0Rm2g.png notepad++_Jbj5hqCJi3.png notepad++_Pz0zgUd3uA.png Unity_pVH6qgGUT0.png Unity_EPwYyHdkQP.png
     
    Last edited: Jan 21, 2022
  11. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    when I add mavenCentre() the build fails, no matter where in the first or the second function
    This is why in logs - notepad++_UlKSjHDr5S.png Unity_uO43c1doVD.png
     
  12. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    Or when I add the implementation string
    "implementation 'com.google.android.gms:play-services-games:22.0.1' "
    the build also fails but with this in logs upload_2022-1-21_13-42-9.png Unity_OvUFernhWt.png
     
  13. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    Oh Unity_a8wiaGV5vH.png Unity_ZjJHN0sgtl.png , I forgot to tell something important - when I try to force resolve or Unity automatically resolves its stops on 100% and gives me a warning. Could it be because I tried to downgrade my GPS plugin from 10.14 to 10.13 and didnt delete something?
     
  14. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    So I fixed it by
    1) Creating a custom proguard file
    2) Checking Debug and Release in publishing settings
    3) Deleting all the files that connected to Google Play services
    4) Downloading the plugin from the github again, then force resolving.
     
  15. ben_11_oujda

    ben_11_oujda

    Joined:
    Oct 25, 2022
    Posts:
    2
    what you write in the custom proguard file