Started by
Nellousan
on
Topic category: Troubleshooting, bugs, and solutions
Hi ! (note: sry if you're getting bad at understanding me, i'm french)
I discovered this software earlier today and i'm already having issues with compiling. While trying to export my test mod i got an error on gradle logs that say something like "cannot find symbol[...]". I think i've miss something.
Btw my mod is act just an ore block that drop a gem (2 elements then) for testing thing like recipes, particles etc.
Here are the logs of gradle while compiling:
C:\Pylo\MCreator176\forge\build\sources\main\java\mod\mcreator\localminecrafttestmod.java:40: error: cannot find symbol
mcreator_gem mcreator_1 = new mcreator_gem();
^
symbol: class mcreator_gem
location: class localminecrafttestmod
1 error
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.
Ty by advance for helping me.
Hum it looks like a bug of MCreator becuz when i create an element and then check on the "Code" Tab if my class is added, and if indeed it's added, it works well.
BUT
When i create an element and when i check if the class is here and it isn't, i have compilation error.
I see nothing else than a MCreator bug here.
(or maybe i missed something obvious)
The "Cannot find symbol" errors generally occur when you try to reference an undeclared variable in your code. A "Cannot find symbol" error means that the compiler cannot do this. Your code appears to be referring to something that the compiler doesn't understand.
When your code is compiled, the compiler needs to work out what each and every identifier in your code means. As the compiler is going through the code it will find something and know what to do with it or not. Your Cannot find symbol error relates to the identifiers and means that Java cannot figure out what the "symbol" means.
The general causes for a Cannot find symbol error are things like:
How do fix it then?
How do fix it then?