"Cannot find symbol" Compiling Error

Started by Hollowplayz on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 01:34, 13. Apr 2024
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
"Cannot find symbol" Compiling Error

Hey, so I was making my mod, and I have been for about a month now, and everything was running perfectly smoothly. However, I log in one day, and now whenever I save something, it tags everything in my mod as a compiling error. The Gradle says that it "cannot find symbol".

Here's an example of one of my elements:

symbol:   class DirectionProperty 
  location: class CrackedBluestoneBricksBlock 
C:\Users\cocoa\OneDrive\Documents\Simple Mining\simple_mining\src\main\java\net\mcreator\simplemining\block\CrackedBluestoneBricksBlock.java:18: error: cannot find symbol 
   public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) { 
                            ^ 
  symbol:   class BlockState 
  location: class CrackedBluestoneBricksBlock 
C:\Users\cocoa\OneDrive\Documents\Simple Mining\simple_mining\src\main\java\net\mcreator\simplemining\block\CrackedBluestoneBricksBlock.java:18: error: cannot find symbol 
   public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) { 
                                              ^ 
  symbol:   class BlockGetter 
  location: class CrackedBluestoneBricksBlock 
C:\Users\cocoa\OneDrive\Documents\Simple Mining\simple_mining\src\main\java\net\mcreator\simplemining\block\CrackedBluestoneBricksBlock.java:18: error: cannot find symbol 
   public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) { 
                                                                   ^ 
  symbol:   class BlockPos 
  location: class CrackedBluestoneBricksBlock 
C:\Users\cocoa\OneDrive\Documents\Simple Mining\simple_mining\src\main\java\net\mcreator\simplemining\block\CrackedBluestoneBricksBlock.java:23: error: package StateDefinition does not exist 
   protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { 
                                                            ^ 

There's twice this amount of errors for this one item.

This is just one item, and it does this for every single item I've made (which is a lot)
Can anybody help fix this?

Last seen on 21:08, 7. Apr 2024
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I had this annoying problem…
Sat, 05/20/2023 - 17:32

I had this annoying problem a couple times. Luckily, its an easy fix.

Here are your choices:

1: Restart MCreator

2: Clean Gradle Caches and Regenerate Code

3: Go in the java code and find a missing character

Last seen on 01:34, 13. Apr 2024
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much
Sat, 05/20/2023 - 18:45

Thank you so much

Last seen on 20:08, 17. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm having an almost…
Mon, 06/26/2023 - 16:22

I'm having an almost identical problem- I've tried clearing the cache, reloading the entire gradle, and regardless, it always comes up with hundreds of Missing Symbol compilation errors for pretty essential files. (.modprocedures, .moditems, .modentities, etc.) The wiki recommends doing the same thing, but it hasn't worked so far.

Last seen on 22:17, 10. Oct 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
every time i change a log…
Sat, 08/12/2023 - 02:26

every time i change a log texture for a wood pack i make there is always a problem with java compiler cant find symbol. it can start as just a problem with the buttons but can also start a problem with everything else in the wood pack. on the 1.19 forge version i was able to fix this just by re entering the blocks i changed thextures of in every element it was associated with like the recipies that contained that block just needed to be reloaded and saved for every element associated, but now im using the fabric generator for 1.20 and i cant seem to fix the problem with the buttons from the wood pack i try to make

Last seen on 22:17, 10. Oct 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it seems i thought some…
Sat, 08/12/2023 - 02:33

it seems i thought some other button cleared casches. at the top of your desktop youl see it under build and run that worked for me

Last seen on 21:52, 17. Apr 2024
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i cant find the missing…
Sun, 03/31/2024 - 13:48

i cant find the missing character how do i find it?