When trying to open new project or build old one this error occurs (I am using Intellij):
put this somewhere in the build.gradle
repositories {
maven { url = 'https://libraries.minecraft.net/' }
mavenCentral()
maven { url = 'https://maven.minecraftforge.net/' }
}
if you already have a repositories block put it in there