"Cannot find symbol" Compiling Error

Started by KoiF on

Topic category: Troubleshooting, bugs, and solutions

Active 4 days ago
Joined Jan 2020
Points:
740

User statistics:

  • Modifications: 2
  • Forum topics: 16
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 25
"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?

Active 2 days ago
Joined Jan 2022
Points:
684

User statistics:

  • Modifications: 14
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 129
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

Active 4 days ago
Joined Jan 2020
Points:
740

User statistics:

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

Thank you so much

Active 2 days ago
Joined Jan 2022
Points:
684

User statistics:

  • Modifications: 14
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 129
np
Sun, 05/21/2023 - 12:55

np

Active 1 hour ago
Joined May 2022
Points:
1202

User statistics:

  • Modifications: 14
  • Forum topics: 25
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1141
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.

Active 1 year ago
Joined Jun 2023
Points:
190

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
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

Active 1 year ago
Joined Jun 2023
Points:
190

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
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

Active 1 month ago
Joined Feb 2022
Points:
426

User statistics:

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

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

Active 1 week ago
Joined Sep 2022
Points:
418

User statistics:

  • Modifications: 4
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 63
@mindthemoos Did you find a…
Wed, 05/29/2024 - 20:23

@mindthemoos Did you find a solution? I'm having the exact same problem and the deadline for the ModJam is coming up fast :(

Active 10 months ago
Joined Jul 2024
Points:
46

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
if they use blockbench for…
Mon, 07/08/2024 - 14:48

if they use blockbench for the model. It worked for me by removing the model identifier and the entiy class (in the section in the file/project) there they remove it.

Active 5 days ago
Joined Jun 2024
Points:
53

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
Fedez thank you
Sun, 09/08/2024 - 19:48

Fedez thank you