Anny
Anny

Reputation: 11

Gradle project Sync failed due to proxy error. Studio is configured to use a HTTP proxy

A problem occurred configuring root project 'BMI calculator'.

Could not resolve all files for configuration ':classpath'. Could not resolve com.android.tools.build:gradle:7.4.1. Required by: project : > com.android.application:com.android.application.gradle.plugin:7.4.1 project : > com.android.library:com.android.library.gradle.plugin:7.4.1 > No matching variant of com.android.tools.build:gradle:7.4.1 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but: - Variant 'apiElements' capability com.android.tools.build:gradle:7.4.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'javadocElements' capability com.android.tools.build:gradle:7.4.1 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'runtimeElements' capability com.android.tools.build:gradle:7.4.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'sourcesElements' capability com.android.tools.build:gradle:7.4.1 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5')

Run with --info or --debug option to get more log output. Run with --scan to get full insights.

upon clicking yes ...Gradle project sync failed error is generated. I tried with no proxy, Inavalidated cache , setting path for JDK but could not able to solve this

Upvotes: 1

Views: 366

Answers (1)

CryptoCode
CryptoCode

Reputation: 1117

Change your Grade JDK to 11 something Gradle 7.4.1 need Java 11 [Ctrl-Alt-Shift-S] -> SDK Location -> click on the link to Gradle Settings

Upvotes: 0

Related Questions