Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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
4
Question by chaurasiyapawan · Jan 18, 2018 at 06:05 PM · androidpluginunity ads

Getting error Gradle failed to fetch dependencies for Google admob plugin

I am getting this error when integrating Google Admob Plugin when try to force resolve from Android Resolver.

Unity version: 2017.2.0f3 personal. GoogleMobileAds v3.10.0.unitypackage JDK: jdk1.8.0_144

Any help will be appreciated.

 Gradle failed to fetch dependencies.
 
 Failed to run 'D:\Temp\PlayServicesResolverGradle\gradlew.bat -b "D:\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" --no-daemon "-PANDROID_HOME=sdk-2" "-PTARGET_DIR=Game\Assets\Plugins\Android" "-PMAVEN_REPOS=https://maven.google.com" "-PPACKAGES_TO_COPY=com.google.android.gms:play-services-ads:11.6.0"'
 stdout:
 
 ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_144;
 
 Please set the JAVA_HOME variable in your environment to match the
 location of your Java installation.
 
 stderr:
 
 exit code: 1
 
 UnityEngine.Debug:LogError(Object)
 Google.Logger:Log(String, LogLevel)
 GooglePlayServices.PlayServicesResolver:Log(String, LogLevel)
 GooglePlayServices.<GradleResolution>c__AnonStorey14:<>m__1F(Result)
 GooglePlayServices.<GradleResolution>c__AnonStorey15:<>m__28()
 GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
 UnityEditor.EditorApplication:Internal_CallUpdateFunctions()



Thanks

Comment
Add comment · Show 1
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
avatar image caner_kapisiz · Jan 03 at 06:24 AM 0
Share

My computer is macbook. Can you help me too?

4 Replies

· Add your reply
  • Sort: 
avatar image
16

Answer by MaxxRafen · Apr 06, 2018 at 11:12 PM

Hi @pawnakumar113,


The issue is this: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_144;


The solution (at least for windows users) is:

  1. Right click on "my computer" and go to properties.

  2. Go to the Advanced tab

  3. Click on the Environmental Variables... button

  4. Find the JAVA_HOME variable under System Variables

  5. Change the value to wherever this file actually exists for you. (for me it was C:\Program Files\Java\jdk-10)

  6. Restart Unity

I hope that helps!

Comment
Add comment · Show 9 · 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
avatar image Abdulrazek · May 08, 2018 at 03:24 AM 0
Share

You Saved my day!

avatar image Naxort · Aug 03, 2018 at 03:34 AM 0
Share

Great! thanks you very much.

avatar image ismaelnascimento01 · Nov 06, 2019 at 12:43 AM 0
Share

How i change on mac ?

avatar image LestatFrost · Jan 14, 2020 at 09:29 PM 0
Share

This solution worked for me still in Jan. 2020. Thank you for your post, I appreciate your clear and concise description so I could fix the problem quickly.

avatar image gputhread · Feb 23, 2020 at 05:21 PM 0
Share

java so poor, it cannot automatically add environment variable...rip java

Show more comments
avatar image
5

Answer by Neohun · Sep 27, 2021 at 07:07 PM

Anyone who struggles with this problem, it is caused by a unity bug! I have a solution which works great for me:

Fix Steps:

1- Go to "Edit -> Preferences -> External Tools"

2- Uncheck and re-check "JDK" under android section and you're done!..

alt text


ss-jdk.png (95.3 kB)
Comment
Add comment · Show 3 · 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
avatar image LeventAlpsal_HLG · Jan 05 at 05:03 PM 0
Share

This fixed my problem.

avatar image caner_kapisiz · Mar 12 at 08:31 PM 0
Share

mac bilgisayarlar için ne yapabiliriz

avatar image aaron4202 · Apr 23 at 09:31 PM 0
Share

This does work but the problem stems from JAVA_HOME. For anyone having this problem create or edit a path for JAVA_HOME in your computers environment variables settings like other guides on this post suggest. This will give you a permanent solution.

avatar image
0

Answer by bhautik74jikadra · Feb 23, 2021 at 12:01 PM

Delete all Google AdS files from the Asset Name folder and re-import the Google AdS package.

Or

-Right click on "my computer" and go to properties.

-Go to the Advanced tab

-Click on the Environmental Variables button

-Find the JAVA_HOME variable under System Variables

-Change the value to wherever this file actually exists for you. (for me it was C:\Program Files\Java\jdk-10)

-Restart Unity

Comment
Add comment · Show 1 · 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
avatar image caner_kapisiz · Mar 12 at 08:31 PM 0
Share

mac bilgisayarlar için ne yapabiliriz

avatar image
0

Answer by caner_kapisiz · Mar 22 at 09:16 PM

bilgisayar mac bu sorunu çözmek için nasıl bir yöntem deneyebiliriz?

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

89 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

Related Questions

Build for Android crashes on startup after adding AdMob plugin v. 7. 0. 0 in my Unity project 0 Answers

Android Multi-Plugins 0 Answers

How to alter the Android Manifest to use my ad-displaying activity in Unity? 0 Answers

Update Notification 1 Answer

Communicate with Android native plugin 0 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