Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
2
Question by polham30 · Apr 11, 2019 at 09:00 PM · android buildapk

How to fix Gradle build error when building android apk?

CommandInvokationFailure: Gradle build failed. C:/Program Files/Java/jdk1.8.0_172\bin\java.exe -classpath "C:\Program Files\Unity(2018.3.5)\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

  • Could not resolve all artifacts for configuration ':classpath'. Could not resolve com.android.tools.build:gradle:3.2.0.

    Required by: project : > Could not resolve com.android.tools.build:gradle:3.2.0. > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'. > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'. > Connect to dl.google.com:443 [dl.google.com/127.0.1.2] failed: Connection refused: connect > Could not resolve com.android.tools.build:gradle:3.2.0. > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'. > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'. > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/127.0.1.3] failed: Connection refused: connect

  • 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

BUILD FAILED in 3s ] stdout[

]

Comment
Add comment · Show 3
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 golzud · Apr 21, 2019 at 09:42 PM 0
Share

I have this problem too, please help i think it is internet connection problem but how and where

i used vpn, proxy, nothing and any other way but the error continues

avatar image prashantsavalia · May 01, 2019 at 03:41 PM 0
Share

Same issue in 2019.10f2. I posted a question but it's still in moderation. Have you had any response on this @polham30?

avatar image rusleykcruz · May 04, 2019 at 01:12 PM 0
Share

Same issue.,Same issue, using 2019.10f2.l. Any solution?

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by polham30 · Jul 03, 2019 at 06:12 AM

Hi, everyone! I fixed this issue. I tried upgrade windows os. After then gradle build error was removed.

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
avatar image
0

Answer by DragonGyke · Jul 02, 2019 at 09:06 PM

Same issue in 2019.1.3. Btw, i think this is not a network issue, because when i access the link in the log in browser, the .pom file could be downloaded successfully.

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
avatar image
0

Answer by sajjadgameactor · Feb 26, 2020 at 08:37 PM

I had the same error and after two day I found the solution. Go to C:\Users\YOURUSERNAME.gradle you should see a file named gradle.properties in this file gradle proxy can be set. for example in my case i have this configuration:

 systemProp.http.proxyHost=127.0.0.1
 systemProp.https.proxyPort=53556
 systemProp.https.proxyHost=127.0.0.1
 systemProp.http.proxyPort=53556

for more infromation about how to configure this file you can check here: https://docs.gradle.org/current/userguide/build_environment.html

I uploaded an image of how to configure gradle.properties here: https://imgur.com/a/Z2vemkD

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

109 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

Related Questions

APK size is abnormaly big 1 Answer

API Level for Google Playstore 0 Answers

Android apk build can install but won't start. 2 Answers

Android Emulator fails to install Unity .apk 0 Answers

APK is installed but does not show the application and does not open either. 1 Answer


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