Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ALIENPANDA · Oct 27, 2021 at 03:56 PM · android buildgoogle play gamesandroidpluginexternal-librariesdependency

Gradle failed to fetch dependencies for Firebase and Google Play Service

I got an error something like this, tried several methods still it couldn't resolve.

LOG

 Gradle failed to fetch dependencies.
 Failed to run 'C:\Unity Games\DownHill Republic\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "C:\Unity Games\DownHill Republic\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2019.4.13f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\Unity Games\DownHill Republic\Assets\Plugins\Android" "-PMAVEN_REPOS=file:///C:/Unity%20Games/DownHill%20Republic/Assets/Firebase/m2repository;file:///C:/Unity%20Games/DownHill%20Republic/Assets/GooglePlayGames/Editor/m2repository" "-PPACKAGES_TO_COPY=com.google.firebase:firebase-common:20.0.0;com.google.firebase:firebase-analytics:19.0.0;com.google.android.gms:play-services-base:17.6.0;com.google.firebase:firebase-app-unity:8.4.0;com.google.firebase:firebase-auth:21.0.1;com.google.firebase:firebase-auth-unity:8.4.0;com.google.firebase:firebase-messaging:22.0.0;com.google.firebase:firebase-iid:21.1.0;com.google.firebase:firebase-messaging-unity:8.4.0;com.google.firebase:firebase-storage:20.0.0;com.google.firebase:firebase-storage-unity:8.4.0;com.google.games:gpgs-plugin-support:0.10.12" "-PUSE_JETIFIER=0" "-PDATA_BINDING_VERSION=3.4.0"'
 stdout:
 stderr:
 FAILURE: Build failed with an exception.
 * What went wrong:
 Could not create service of type DefaultModuleRegistry using GlobalScopeServices.createModuleRegistry().
 * Try:
 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
 * Get more help at https://help.gradle.org
 exit code: 1
 
 [Log] DependOn - group: com.google.firebase artifact: firebase-common version: 20.0.0 classifier: null packageIds: repositories:
 [Log] (4) DependOn - group: com.google.firebase artifact: firebase-analytics version: 19.0.0 classifier: null packageIds: repositories:
 [Log] DependOn - group: com.google.android.gms artifact: play-services-base version: 17.6.0 classifier: null packageIds: repositories:
 [Log] DependOn - group: com.google.firebase artifact: firebase-auth version: 21.0.1 classifier: null packageIds: repositories:
 [Log] DependOn - group: com.google.firebase artifact: firebase-messaging version: 22.0.0 classifier: null packageIds: repositories:
 [Log] DependOn - group: com.google.firebase artifact: firebase-iid version: 21.1.0 classifier: null packageIds: repositories:
 [Log] DependOn - group: com.google.firebase artifact: firebase-storage version: 20.0.0 classifier: null packageIds: repositories:
 [Log] Reading Android dependency XML file Assets/GooglePlayGames/Editor/GooglePlayGamesPluginDependencies.xml
 [Log] DependOn - group: com.google.games artifact: gpgs-plugin-support version: 0.10.12 classifier: null packageIds: repositories: Assets/GooglePlayGames/Editor/m2repository
 
 Resolution failed
 Failed to fetch the following dependencies:
 com.google.firebase:firebase-common:20.0.0
 com.google.firebase:firebase-analytics:19.0.0
 com.google.android.gms:play-services-base:17.6.0
 com.google.firebase:firebase-app-unity:8.4.0
 com.google.firebase:firebase-auth:21.0.1
 com.google.firebase:firebase-auth-unity:8.4.0
 com.google.firebase:firebase-messaging:22.0.0
 com.google.firebase:firebase-iid:21.1.0
 com.google.firebase:firebase-messaging-unity:8.4.0
 com.google.firebase:firebase-storage:20.0.0
 com.google.firebase:firebase-storage-unity:8.4.0
 com.google.games:gpgs-plugin-support:0.10.12
 
 [Log] Missing Android component com.google.firebase:firebase-common:20.0.0 (Android SDK Packages: )
 [Log] Missing Android component com.google.firebase:firebase-analytics:19.0.0 (Android SDK Packages: )
 [Log] Missing Android component com.google.android.gms:play-services-base:17.6.0 (Android SDK Packages: )
 [Log] Missing Android component com.google.firebase:firebase-app-unity:8.4.0 (Android SDK Packages: )
 [Log] Missing Android component com.google.firebase:firebase-auth:21.0.1 (Android SDK Packages: )
 [Log] Missing Android component com.google.firebase:firebase-auth-unity:8.4.0 (Android SDK Packages: )
 [Log] Missing Android component com.google.firebase:firebase-messaging:22.0.0 (Android SDK Packages: )
 [Log] Missing Android component com.google.firebase:firebase-iid:21.1.0 (Android SDK Packages: )
 [Log] Missing Android component com.google.firebase:firebase-messaging-unity:8.4.0 (Android SDK Packages: )
 [Log] Missing Android component com.google.firebase:firebase-storage:20.0.0 (Android SDK Packages: )
 [Log] Missing Android component com.google.firebase:firebase-storage-unity:8.4.0 (Android SDK Packages: )
 [Log] Missing Android component com.google.games:gpgs-plugin-support:0.10.12 (Android SDK Packages: )

Any way to solve this?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ALIENPANDA · Oct 30, 2021 at 12:37 PM

  1. In the Unity Editor, open your project and go to Project Settings > Player > Publish Settings > Custom Main Gradle Template and ensure the Custom Main Gradle Template checkbox is enabled.

  2. Then, go to the Project tab and navigate to Assets > PlayServicesResolver > Android Resolver > Force Resolve.

  3. Now try to build the project. (With these settings, Android dependencies will not be included directly in the project anymore)

This will resolve all the dependencies. In case if you have trouble while taking build (Gradel Build). Go to Project Settings > Player > Publishing Settings and select the Custom Gradle Properties Template checkbox. Then Navigate to the path below the checkbox and add these two lines to the end of the file:

 android.useAndroidX=true
 android.enableJetifier=true

And then take a build. hope it works.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

137 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unsupported major.minor version 52.0 - Android Build Error 2 Answers

Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define 0 Answers

i try to build to andriod but i keep getting this error what can i do about it? 0 Answers

Importing object type from .so lib 1 Answer

Android build crashes on start up. 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges