Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Google play services and admob problem

Discussion in 'Editor & General Support' started by bostudio, Jan 1, 2019.

  1. bostudio

    bostudio

    Joined:
    Nov 28, 2017
    Posts:
    20
    Hi guys,
    When I add google play services plugin to my game, everything works fine, but then when I add the admob plugin, I get this warning error:

    Code (CSharp):
    1. Some conflicting dependencies were found.
    2. The following dependency versions were modified:
    3. com.google.android.gms:play-services-ads:15.0.1 --> com.google.android.gms:play-services-ads:+
    4. com.google.games:gpgs-plugin-support:0.9.57 --> com.google.games:gpgs-plugin-support:+
    5.  
    6. UnityEngine.Debug:LogWarning(Object)
    7. Google.Logger:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:87)
    8. GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:691)
    9. GooglePlayServices.<GradleResolution>c__AnonStorey17:<>m__28(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:636)
    10. GooglePlayServices.<GradleResolution>c__AnonStorey19:<>m__33() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:708)
    11. Google.RunOnMainThread:ExecuteNext() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
    12. Google.RunOnMainThread:<ExecuteAll>m__6() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:394)
    13. Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
    14. Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:392)
    15. Google.RunOnMainThread:Run(Action, Boolean) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:349)
    16. GooglePlayServices.<GradleResolution>c__AnonStorey17:<>m__29(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:709)
    17. GooglePlayServices.<GradleResolution>c__AnonStorey17:<>m__2A(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:760)
    18. GooglePlayServices.ProgressReporter:SignalComplete() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:116)
    19. GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:107)
    20. GooglePlayServices.<RunAsync>c__AnonStorey2:<>m__3() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLine.cs:136)
    21. Google.RunOnMainThread:ExecuteNext() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
    22. Google.RunOnMainThread:<ExecuteAll>m__6() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:394)
    23. Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
    24. Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:392)
    25. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    26.  
    When I build the game, the app crashes before startup.

    Thank you guys for your help
     
  2. nullgamestudios

    nullgamestudios

    Joined:
    Dec 17, 2018
    Posts:
    2
    Exactly same.
     
  3. Schizoid2k

    Schizoid2k

    Joined:
    May 6, 2015
    Posts:
    40
    Yep, same here. I was lucky enough to get it to work once, but I cannot get it to work again while trying to release an update to my app. Unless there is a documented solution that I can follow, I am about at the point where I will investigate using Unity Ads, using IAP, or some other non-Admob solution.

    Very frustrating to say the least.
     
    bostudio likes this.
  4. bostudio

    bostudio

    Joined:
    Nov 28, 2017
    Posts:
    20
    Actually I am using Unity 2018.3, Google PlayGamesPlugin v 0.9.57 and GoogleMobileAds v 3.15.1. I replaced them with previous versions but nothing changes. When i use only one plugin, it works. When I install them together the app doesn't even start. A pop-up window appears: unfortuanately, "app name" has stopped.
     
    Spinogrblzzz likes this.
  5. bostudio

    bostudio

    Joined:
    Nov 28, 2017
    Posts:
    20
    That is just frustrating, I mean, having to completely remove admob fom the app because of a such error ...
     
  6. bostudio

    bostudio

    Joined:
    Nov 28, 2017
    Posts:
    20
    Any other suggestion would be very appreciated. I am stuck with this error and I can not carry on my project :(
     
  7. Schizoid2k

    Schizoid2k

    Joined:
    May 6, 2015
    Posts:
    40
    Originally (last year), I followed this video and after some trial and error, it finally worked. I do admit, that it took longer than the 5 minutes indicated in the video title ;).

    About a week ago, I tried to update my app, and re-imported admob and gpgs using this video, and I had so many problems that I just decided it wasn't worth it. I am investigating Unity Ads (although the $ made from this app is so low, I may never see a payout).

    If you have any luck, please let me know. It is so frustrating that 2 Google plugins do not play nice together. I don't want to go through this every time I need to update my app.

    --john
     
    Thoma1207 and bostudio like this.
  8. nullgamestudios

    nullgamestudios

    Joined:
    Dec 17, 2018
    Posts:
    2
    I have solved the problem. Update the value of play services like that
    play-services-ads:17.1.1 in the Assets > GoogleMobileAds > Editor > GoogleMobileAdsDependencies.xml. This changes solved my problem, I hope it works for you too.
     
  9. c3e3m

    c3e3m

    Joined:
    Nov 29, 2018
    Posts:
    6
    did you find a solution??
     
  10. c3e3m

    c3e3m

    Joined:
    Nov 29, 2018
    Posts:
    6
    did you import packages as it is or did you make some changes?
    i changed as you said but still cant open apk:(
     
  11. bostudio

    bostudio

    Joined:
    Nov 28, 2017
    Posts:
    20
    After lot of trying and researching I ended by deciding not to include google play services in my game. I tried every solution I could find but nothing solved it.
    I wonder if the problem is due to my SDK. What are the APIs that should be installed for it to work properly ?

    When importing the package try unchecking the files that are already installed by Google mobile ads package especially player resolver.
     
    c3e3m likes this.
  12. rodney1234

    rodney1234

    Joined:
    Oct 2, 2013
    Posts:
    1
    Solved,
    The issue is the version of Google Play Service plugin, (can someone email google this problem). Delete Google Play Service plugin, reimport the version 0.9.53 in the "old-builds" folder, after import right click on PlayServiceResolver folder, Resolve for android. You don't have to change the Admob plugin.
     
    chillmaze, khrysller, BRNAS5 and 2 others like this.
  13. tablazonsimon

    tablazonsimon

    Joined:
    Feb 7, 2019
    Posts:
    3
    You..... You, sir... ARE AMAZING.
     
  14. BRNAS5

    BRNAS5

    Joined:
    Apr 1, 2017
    Posts:
    1
    Amazing.. It Worked
     
  15. khrysller

    khrysller

    Joined:
    Mar 14, 2019
    Posts:
    125
    Thanks for this. I end up using a backup file and using the version you suggested.
     
  16. LAKSHAYMAVIA

    LAKSHAYMAVIA

    Joined:
    Aug 28, 2018
    Posts:
    27
    This video solved this problem
     
  17. DmitryKanunnikoff

    DmitryKanunnikoff

    Joined:
    Jul 9, 2017
    Posts:
    4
    Good afternoon.

    There was a similar problem ("Some conflicting dependencies were found.").

    Installed plugins:
    1. GooglePlayGamesPlugin-0.9.64.unitypackage
    2. GoogleMobileAds-v3.18.0.unitypackage

    Found the solution as follows:
    1. downloaded and installed the plugin Unity Jar Resolver separately: https://github.com/googlesamples/unity-jar-resolver/releases (play-services-resolver-1.2.121.0.unitypackage at the moment)
    2. removed all dependencies: Assets -> Play Services Resolver -> Android Resolver -> Delete Resolved Libraries
    3. installed dependencies again: Assets -> Play Services Resolver -> Android Resolver -> Force Resolve

    After that, the game no longer crashed on the Android phone. Advertising banner (AdMob) is displayed.

    Regards.
     
    Last edited: Jul 2, 2019
    msafa160754 and ruimcp95 like this.
  18. Squirenetic

    Squirenetic

    Joined:
    Nov 8, 2016
    Posts:
    4
    You saved my day, thanks! Nothing else I found worked for me, and I'd almost given up and started looking at other options for ads for now. Big kudos for posting the solution here :)
     
    DmitryKanunnikoff likes this.
  19. CyberInteractiveLLC

    CyberInteractiveLLC

    Joined:
    May 23, 2017
    Posts:
    307
    Where can i find the "old-builds" folder? I been struggling with this for weeks

    EDIT: Found it, and the problem is fixed! thaaaaaaaaaaaaaaank YOU
     
    Last edited: Jul 3, 2019
  20. huynq0911

    huynq0911

    Joined:
    Apr 30, 2019
    Posts:
    2
    Hi, Can you show detail steps?
     
  21. CyberInteractiveLLC

    CyberInteractiveLLC

    Joined:
    May 23, 2017
    Posts:
    307
    Sure,

    1- download latest version of Admob plugin + Imported it on unity
    2- download latest version of Play services plugin but DO NOT import it on unity
    3- on the downloaded files of play services plugin, go to "old-builds" then import version 0.9.53 to unity
    4- Right click PlayServiceResolver and resolve android
     
  22. huynq0911

    huynq0911

    Joined:
    Apr 30, 2019
    Posts:
    2
    Not worked for me :(
     
  23. chillmaze

    chillmaze

    Joined:
    Jun 24, 2019
    Posts:
    1
    Hello i tried your solution and it's worked app stopped from crash but play service always failed to login while the green connection windows show up ... any fix please
     
  24. bws99

    bws99

    Joined:
    Apr 24, 2017
    Posts:
    11
    same situation for me dude @chillmaze did u find any solution?. Trying to figure out this problem for 2 days :/
     
  25. bws99

    bws99

    Joined:
    Apr 24, 2017
    Posts:
    11
    @chillmaze i solved it with this video!! so happy now:)
     
    Venture87 likes this.
  26. GhulamJewel

    GhulamJewel

    Joined:
    May 23, 2014
    Posts:
    351
    I have the same problem I can use either of the plugins but if used together on play authentication the app crashes. Still haven’t resolved it. I use both latest plugins on Unity 2018.4.
     
  27. gbriozzo

    gbriozzo

    Joined:
    Sep 7, 2018
    Posts:
    2
    Sir, you're a GOD amongst humans
     
  28. ruimcp95

    ruimcp95

    Joined:
    Mar 19, 2019
    Posts:
    5
    This should be all over the internet.
    I've been haunted by this for ages.
    Thank you.

    As you said:
    I removed everything related to google: Deleted Resolved Libraries, deledted Google Play folder, Goodle Admob folder, Plugins>Android folder. Imported Google Play Services without "External Dependencies folder". Imported Admob without External Dependencies folder and Package. Installed/imported Jar Libraries resolver (External Dependency Resolver) independently. Set up both Google Play Services and Admob. External Dependency Resolver > Force Resolve.
    A detail, I had already changed the Android app signing with the Sha1 key given by Google. Still it was not working. And this was all people focused on in other forums and Q/A's.
    But with this it is finally working!
    THANK YOU!
     
    Last edited: Dec 3, 2020
  29. flintcheeze

    flintcheeze

    Joined:
    Sep 10, 2015
    Posts:
    80
    Omo I am happy for you guys… but I am still facing this crash on start issues Unity Unity mobile ads 4.4.1 and gpgs 10.14
     
  30. Loomabox

    Loomabox

    Joined:
    Nov 4, 2015
    Posts:
    47
    Google is a multinational company worth a billions, but at the same time it cannot write two plugins that would work in one project without problems :D That is not normal :(
     
  31. Loomabox

    Loomabox

    Joined:
    Nov 4, 2015
    Posts:
    47
    I spent more than a week before I realized that the problem was in the proguard-user.txt file o_O

    Unity version: 2019.4
    Google Mobile Ads v7.1.0
    Google Play Games v10.12
    Target platform: Android

    If you are using the "Custom Proguard File" option you must add the following lines to your proguard-user.txt file

    -keep class com.google.android.gms.games.PlayGames { *; }
    -keep class com.google.android.gms.games.leaderboard.** { *; }
    -keep class com.google.android.gms.games.snapshot.** { *; }
    -keep class com.google.android.gms.games.achievement.** { *; }
    -keep class com.google.android.gms.games.event.** { *; }
    -keep class com.google.android.gms.games.stats.** { *; }
    -keep class com.google.android.gms.games.video.** { *; }
    -keep class com.google.android.gms.games.* { *; }
    -keep class com.google.android.gms.common.api.ResultCallback { *; }
    -keep class com.google.android.gms.signin.** { *; }
    -keep class com.google.android.gms.dynamic.** { *; }
    -keep class com.google.android.gms.dynamite.** { *; }
    -keep class com.google.android.gms.tasks.** { *; }
    -keep class com.google.android.gms.security.** { *; }
    -keep class com.google.android.gms.base.** { *; }
    -keep class com.google.android.gms.actions.** { *; }
    -keep class com.google.games.bridge.** { *; }
    -keep class com.google.android.gms.common.ConnectionResult { *; }
    -keep class com.google.android.gms.common.GooglePlayServicesUtil { *; }
    -keep class com.google.android.gms.common.api.** { *; }
    -keep class com.google.android.gms.common.data.DataBufferUtils { *; }
    -keep class com.google.android.gms.games.quest.** { *; }
    -keep class com.google.android.gms.nearby.** { *; }

    Links
    https://github.com/playgameservices/play-games-plugin-for-unity/blob/master/scripts/proguard.txt
    https://stackoverflow.com/questions/61013678/google-play-games-service-in-unity-doesnt-authenticate