Build failed

Published by Tunky68 on
Status
Resolved
Issue description

Executing Gradle task: build
Build info: MCreator 2020.2.14217, 1.14.4, 64-bit, 16303 MB, Windows 7, JVM 1.8.0_232, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk
BUILD FAILED
Task completed in 17363 milliseconds
> Configure project :
New Dep: net.minecraftforge:forge:1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3
> Task :compileJava
C:\Users\TunkySixSvn\MCreatorWorkspaces\mod\src\main\java\net\mcreator\mod\Mod.java:39: error: incompatible types: Mod cannot be converted to Annotation @Mod("mod")
 ^
1 error
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:c…
BUILD FAILED in 3s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 5761 milliseconds

Issue comments

In some cases, Gradle caches that make sure the build process does not take too long can get corrupted. In such a case, go to:

<your user home folder>/.mcreator/gradle

In this folder, there is a folder called caches. Delete this folder and open MCreator again. Next build will take a bit longer as caches need to be rebuilt.

If this is not enough to make things work, delete the entire gradle folder, not just caches and try again.

If even this fails, try to delete the entire <your user home folder>/.mcreator/gradle folder, create a new workspace with the same generator version as the version of the workspace failing, after the setup of this new workspace is done, open your current workspace, and click Build & run -> Reload gradle project and then Build & run -> Regenerate code and build.