question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not fetch model of type 'GradleProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-7.2-bin.zip'

See original GitHub issue

When I tried to open build.gradle, normally it will just build it for me, but it returned with this error: Could not fetch model of type 'GradleProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-7.2-bin.zip'

Environment
  • Operating System: Windows 10
  • JDK version: 16.0.2
  • Visual Studio Code version: 1.61.2
  • Java extension version: 1.1.0
Steps To Reproduce
  1. opening build.gradle
Current Result
CONFIGURE FAILED in 14s
[error] [gradle-server] Could not fetch model of type 'GradleProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-7.2-bin.zip'.
[error] Error getting build for c:\Users\meee\OneDrive\Desktop\fabric-example-mod: Could not fetch model of type 'GradleProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-7.2-bin.zip'.
[info] Found 0 tasks

(this is part of the question I posted on StackOverflow: https://stackoverflow.com/questions/69591576/vscode-could-not-fetch-model-of-type-gradleproject-using-gradle-distribution)

Expected Result

build the project

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:27 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
snjezacommented, Oct 23, 2021

C:\Users\meee.tooling\gradle\

C:\Users\meee\.cache\tooling\

1reaction
snjezacommented, Oct 22, 2021

Hi, I already configured java.home to JDK 16.0.2, then I tried setting java.import.gradle.java.home to JDK 16.0.2, and also restarted vscode, but it still returned with the same error.

@orange2222222222 Could you try to set the following property?

"java.configuration.runtimes": [

        {
            "name": "JavaSE-16",
            "path": "C:\\Program Files\\Java\\jdk-16.0.2",
            "default": true
        }
]

The issue is reproducible if you’re using JDK < 16 for running the Gradle daemon

@0dinD I have seen it, but it is another issue. I can’t reproduce the following error:

Could not fetch model of type ‘GradleProject’ using Gradle distribution…

This error can be caused by an invalid gradle distribution in ~/.cache/tooling or ~/.gradle/wrapper/dists

Read more comments on GitHub >

github_iconTop Results From Across the Web

Eclipse Gradle Plugin 'could not fetch model of type'
The problem is for the java version configured by default on the IDE (Eclipse or Spring Tool Suite). The error is the following:....
Read more >
Gradle build in Eclipse failed error : could not fetch model of ...
I am using Gradle5.1.1. While importing the project in eclipse, I get error : could not fetch model of type 'gradlebuild' using gradle...
Read more >
Could not fetch model of type 'GradleProject' #476 - GitHub
Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.4-all.zip'.
Read more >
Could not fetch model of type 'EclipseProject' using Gradle ...
As illustrated in the accepted answer, this "could not fetch model of type..." error can be caused by a syntax error in the...
Read more >
513812 – Error while importing Gradle project makes ... - Bugs
BuildException : Could not fetch model of type 'GradleBuild' using Gradle distribution 'https://services.gradle.org/distributions/gradle-3.4.1-all.zip' After ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found