Home > Back-end >  The consumer was configured to find a runtime of a component compatible with Java 8, packaged as a j
The consumer was configured to find a runtime of a component compatible with Java 8, packaged as a j

Time:12-21

I've cloned a repo and I'm trying to open it but I'm getting this error and I have no idea how to resolve it. I've tried googling but still not sure what to do.

Full error:

A problem occurred configuring root project 'java-score-examples'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve foundation.icon:gradle-javaee-plugin:0.7.9.
     Required by:
         project :
      > No matching variant of foundation.icon:gradle-javaee-plugin:0.7.9 was found. The consumer was configured to find a runtime of a component compatible with Java 8, packaged as a jar, and its dependencies declared externally but:
          - Variant 'apiElements' capability foundation.icon:gradle-javaee-plugin:0.7.9 declares a component, 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
          - Variant 'runtimeElements' capability foundation.icon:gradle-javaee-plugin:0.7.9 declares a runtime of a component, 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

I've made sure my intellij project is using Java 11

enter image description here

enter image description here

Edit:

Still can't figure it out after an entire day. Tried one last attempt by changing the System's environment variables to using the path of the JDK 11. Still didn't work. I've given up on this.

CodePudding user response:

I guess you have read the repos .md file? it might say something on how to get started. which repo is it? a link to open source could help. have you tried mvnw? if you have such a file in your project root

CodePudding user response:

I'm serious....a minute after I finished editing the question to saying I was going to give up after trying for an entire day... I decided to update my USER Variables to JDK11 for the heck of it.

My last attempt before officially giving up was updating the Environment variables to using JDK 11. Didn't know gradle used the User variables to build.

I should've became a garbage man instead. FML

enter image description here

  • Related