Search code examples
javagradleminecraft-forge

How can I fix error "Could not resolve dev.architectury:architectury-pack200:0.1.3." for my java project?


I have a java program (with a couple of classes) that I need to export. To export it, I use the

gradlew build

command. But I always encounter this error

Could not resolve dev.architectury:architectury-pack200:0.1.3.

I tried changing the gradle jvm multiple times (did not change anything) as that is the solution I found online.

Here are some information you might need to help me: **Full log: https://paste.md-5.net/ezemuburaj.http

Full log (--stacktrace): https://paste.md-5.net/zoharupeqe.http

Gradle JVM : 17

Project SDK : 8

Build.graddle(.kts): https://paste.md-5.net/xolutijawe.cpp**


Solution

  • This is the important part of your log: Incompatible because this component declares a component compatible with Java 16 and the consumer needed a component compatible with Java 8 But you can't just switch to Java 16, since I notice minecraft("com.mojang:minecraft:1.8.9") in your build.gradle, and Minecraft 1.8 doesn't support any versions of Java newer than 8. Further, https://www.curseforge.com/minecraft/mc-mods/architectury-api/files/all looks like Architectury only supports Minecraft 1.16 and up. You need to either update your mod to target a matching version of Minecraft (and then you'd be able to use a newer Java version), or give up on using Architectury in your mod.