Fix the error "Could not install Gradle distribution from xxx" (using a proxy)

Started by idlike on

Topic category: Troubleshooting, bugs, and solutions

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Fix the error "Could not install Gradle distribution from xxx" (using a proxy)

If you are unable to directly configure Gradle within China and need to use a proxy to access it, but setting the system proxy does not allow it to download successfully, then you need to manually set the Gradle proxy.

You need a proxy software (such as Clash, V2Ray, etc.), configure a proxy within it that can connect to the external network, and enable the proxy.

First, create the workspace you need.

Open the gradle.properties file in the workspace directory using Notepad or any other text editor, and add the following code at the end:

// Http proxy
systemProp.http.proxyHost=your proxy IP(local proxy is 127.0.0.1)
systemProp.http.proxyPort=your proxy port(in yor proxy software set it)
// Https proxy
systemProp.https.proxyHost=your proxy IP(local proxy is 127.0.0.1)
systemProp.https.proxyPort=your proxy port(in yor proxy software set it)

After adding these contents, reopen the workspace, and it should be able to be created without any issues.

I suggest the official team add an option to set the proxy!