Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Unity 6 (Can't resolve dependencies) #3313

Open
serginian opened this issue Aug 22, 2024 · 6 comments
Open

Not working with Unity 6 (Can't resolve dependencies) #3313

serginian opened this issue Aug 22, 2024 · 6 comments
Labels

Comments

@serginian
Copy link

serginian commented Aug 22, 2024

Describe the bug
Not working with Unity 6. Can't resolve dependencies

To Reproduce
Steps to reproduce the behavior:

  1. Create any new project from templates or empty one using latest Unity 6 version.
  2. Install Google Play Games plugin
  3. Switch to Android
  4. Try Resolve dependencies

Expected behavior
Dependencies should be resolved.

Observed behavior
Gradle can't find a package to resolve dependencies

Versions

  • Unity version: Unity 6 build 15
  • Google Play Games Plugin for Unity version: 0.11.01

Additional context
n\a

@serginian serginian added the bug label Aug 22, 2024
@hippogamesunity
Copy link

+1

1 similar comment
@ntngamedev
Copy link

+1

@j1mmie
Copy link

j1mmie commented Oct 17, 2024

This package is broken for me in Unity 6000.0.23f1 LTS. I found an alternative that works with Unity 6 though.

Thaina/play-games-plugin-for-unity extends this repository by making it available on UPM. Much easier to work with.

To migrate, I essentially uninstalled the Play Games Plugin for Unity and started from scratch using Thaina's method.

In my Player / Publishing Settings, I unchecked all of the Build checkboxes (Custom Main Gradle Template, Custom Gradle Properties Template, and so on)

Upon first build, Unity asks if you want to migrate your gradle templates. I selected yes. This will automatically modify the gradle templates, and check their checkboxes in Player / Publishing Settings for you.

Then I checked Custom Proguard File and added the entries recommended here: https://github.com/playgameservices/play-games-plugin-for-unity/blob/master/scripts/proguard.txt

Shoutout @Thaina for making this happen! Now my team can upgrade to Unity 6 and avoid paying $6000 to remove the freaking Unity logo

@ohyouknow24
Copy link

ohyouknow24 commented Oct 18, 2024

Here is what worked for me: https://discussions.unity.com/t/game-play-services-resolver-bug-still-in-unity-6-sdk-34-35-found-workaround-temp-solution/1538619/3

But I'll paste it below as well. I've spent the last week trying to find some sort of solution so this temp fix works for me, for now until Unity/Google gets their ish together:

Ok found a workaround temp fix. @unity needs to resolve this matter but here is the workaround that just worked for me. I have two projects of my game, one in unity 6 and one In unity 2023. Install the same plugin in both, so for me that was 10.14. Go to the 2023 (or older) stable version where force resolver works no problem. So what you do is after force resolve, look in Assets\Plugins\Android. You’ll see dozens of plug-ins. Reveal that plugin folder in finder. Now go back to Unity 6. Make sure your android setup (window> google play games) is done, then go to external dependency and do a regular resolve, not a force. Because of the bug, there should be no plug-ins in there, and if there is, delete whatever is in there except GooglePlayGamesManifest. Reveal that folder in finder. Now copy everything in the 2023 plug in folder and paste it into the unity 6 plug in folder. If it asks to replace certain files, click replace. Come back to unity 6, all the plug ins should now be in there.

DO NOT FORCE RESOLVE - DO NOT REGULAR RESOLVE - DO NOT DO THE GOOGLE PLAY GAMES ANDROID SET UP - DO NOT BUILD AND RUN - DO NOT DO ANYTHING NOW EXCEPT THIS

  1. Make sure your publisher settings and player settings, etc are how you want it to be for the build. SDK MINIMUM SHOULD BE API 26 and set target to 35. You must set min to 26 or it will crash.
  2. DO NOT BUILD & RUN - if you do, it will remove the plug ins and you’ll have to copy and paste again and it will throw the Gradle error.
  3. INSTEAD do build profiles and just make a regular build FIRST. It should now successfully build it out without the Gradle issue (no clue why)
  4. NOW, after it successfully built it, press build and run and it’ll successfully install the apk onto your device. Again, if you do build and run first, it won’t do a successful build.

ALSO - ANOTHER SUGGESTION
For the time being I would uncheck “enable auto-resolution” and “enable resolution on build” in the external dependency android resolver settings. If you don’t disable these two, every time you close and open your project, you’ll have to copy and paste the plug ins again. You also don’t need to do the android setup anymore either, it’s already set and if you do that, you’ll have to once again copy and paste the plug-ins.

This is my temporary fix for now. Unity, please figure out what’s going on. Hope this helps someone else

@pacolaf
Copy link

pacolaf commented Oct 23, 2024

I've finally made it work!

Here are the steps I followed to get Google Play Games working with my Unity 6000.0.23f1 project:

  1. Installed the Google Play Games Unity Plugin 0.11.01. After that, Android dependency resolution will fail because of the default included EDM4U version (1.2.169).
  2. Installed EDM4U 1.2.183. Now, the Android dependency resolution is working properly.
  3. Modified the "/Assets/Plugins/Android/settingsTemplate.gradle" file as follows:

Before:

        maven {
            url (unityProjectPath + "/Assets/GooglePlayGames/com.google.play.games/Editor/m2repository") // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
        }

After:

        maven {
            url (unityProjectPath + "/Assets/GeneratedLocalRepo/GooglePlayGames/com.google.play.games/Editor/m2repository") // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
        }

I hope this information is useful for those who have the same issue.

@karthikeyan9952
Copy link

I've finally made it work!

Here are the steps I followed to get Google Play Games working with my Unity 6000.0.23f1 project:

  1. Installed the Google Play Games Unity Plugin 0.11.01. After that, Android dependency resolution will fail because of the default included EDM4U version (1.2.169).
  2. Installed EDM4U 1.2.183. Now, the Android dependency resolution is working properly.
  3. Modified the "/Assets/Plugins/Android/settingsTemplate.gradle" file as follows:

Before:

        maven {
            url (unityProjectPath + "/Assets/GooglePlayGames/com.google.play.games/Editor/m2repository") // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
        }

After:

        maven {
            url (unityProjectPath + "/Assets/GeneratedLocalRepo/GooglePlayGames/com.google.play.games/Editor/m2repository") // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
        }

I hope this information is useful for those who have the same issue.

Thanks. It really works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants