Search Unity

Unity GooglePlayGamesPlugin 0.9.50 package import issue

Discussion in 'Android' started by stalker_shin, Jun 25, 2018.

  1. stalker_shin

    stalker_shin

    Joined:
    Jun 25, 2016
    Posts:
    17
    I'm trying to import google play services in my Unity game to get AdMob working through the IronSource Ad SDK.

    The first step of importing the GooglePlayGamesPlugin-0.9.50.unitypackage works well and I can get a nice "The Google Play Games Plugin for Unity version 0. 9.50 is now ready to use" popup.

    After this step the Google Version Handler asks me to delete some obsolete files in my project (Google.IOSResolver.dll/JarResolver.dll and PackageManager.dll).

    Finally there is this "Android Resolves Dependencies" step which is interrupted by this message :

    Android SDK packages need to be installed : * tools (26.1.1).

    When I click yes, it seems to work, but a second popup message appears :

    Android SDK packages need to be installed : * extras;android;m2repository

    And here I'm stuck because when I click yes, Unity logs this :

    Android SDK package extras;android;m2repository (extra-android-m2repository) not installed or out of date.

    I tried many many solutions that I found here and there on google but nothing worked so far.

    For information my Android SDK and JDK are linked in the Unity preferences External tools. And I can build on my Android device when I don't importe this package.

    And the Android Support Repository (which contain the m2repository lib I guess) package is installed via the Android SDK Manager. I can also find the m2repository at this path : [...]android-sdk\extras\android (containing various files).

    Thank you in advance for your help.
     
  2. vladk

    vladk

    Joined:
    Jul 10, 2008
    Posts:
    167
    You need to instal Android SDK and inside of SDK Manager install Build-tools version 26 or higher and accordingly install SDK Platform and images for the same API level. For example if you choose to install Build-tools version 27 then you'll need to install "Android 8.1.0 (API 27)".

    Also make sure you install (in the SDK manager): Android Support Repository, Google Play Services, Google Repository, Google USB driver.
     
  3. stalker_shin

    stalker_shin

    Joined:
    Jun 25, 2016
    Posts:
    17
    Thank you for your answer vladk.

    I think I installed everything you said ( / I could :p) : https://ibb.co/kutrQT (screenshot here)

    But unfortunately I still have the same error : https://ibb.co/fjhkkT (screenshot here)

    There is some linking that seems to not occur but I have no clue how to help Unity to find that m2repository...
     
  4. vladk

    vladk

    Joined:
    Jul 10, 2008
    Posts:
    167
    did you specified path to your android SDK in the Edit->Preferences...->External Tools ?
     
  5. stalker_shin

    stalker_shin

    Joined:
    Jun 25, 2016
    Posts:
    17
    Yes ! And I even can build on Android when I remove all the GamePlayServices package files.

     
  6. vladk

    vladk

    Joined:
    Jul 10, 2008
    Posts:
    167
    Try this
     
  7. stalker_shin

    stalker_shin

    Joined:
    Jun 25, 2016
    Posts:
    17
    Thank you for the video.

    Unfortunately it doesn't work for me. When I delete the files and then try to force resolve, I just get prompted the same popups as before and end up on the same issue as I described in my first post :

     
    Last edited: Jun 27, 2018
  8. vladk

    vladk

    Joined:
    Jul 10, 2008
    Posts:
    167
  9. stalker_shin

    stalker_shin

    Joined:
    Jun 25, 2016
    Posts:
    17
    Thanks for your help vladk but it seems that the problem is still somewhere else because I checked my environment variables, my Android SDK setup and even updated my JDK, and everything seems fine.

    I even tried to install that on an empty test project and it worked there. So my guess is that's this issue is related to my project.
    I think it's a dependency resolving issue because I already have some android libs installed on my game from other tools that I use :/

    If someone knowns how to resolve manually this dependencies and succeed that package importation it'd be amazing!

    Thank you in advance.
     
  10. GreenGateComp

    GreenGateComp

    Joined:
    Oct 3, 2017
    Posts:
    1
    I have same problem with admob facebook mediation package
     
  11. aurelienpic

    aurelienpic

    Joined:
    Jan 25, 2014
    Posts:
    9
    Hello.
    If that can help anyone still reading this post: I had a similar issue and fixed it.
    The reason is a bug in the Play Services Resolver that appeared in version 1.2.88.0: https://github.com/googlesamples/unity-jar-resolver/issues/151
    The solution for me was to use an older version, for instance 1.2.84.0 that you can find in Firebase Unity SDK 5.2.1.
    Hope this helps.