Jump to content

gradlew build error: cannot access sa


datdenkikniet

Recommended Posts

So, whenever i try to gradlew build my mod, it will give an error in compileJava when a class that contains  that access fields is compile, for instance:

 

[spoiler=code]

public class EventCaller {
@SubscribeEvent
public void onEvent(EntityInteractEvent e){
	Entity et = e.target; //errors here
	System.out.println(et.ticksExisted);//and here, as you can see in the log
}
}

 

 

[spoiler=log]


F:\ForgeWorkspace>gradlew build
****************************
Powered By MCP:
http://modcoderpack.com/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
MCP Data version : unknown
****************************
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.6
F:\ForgeWorkspace\build\sources\java\me\datdenkikniet\PixelmonToCauldron\EventCaller.java:18: error: cannot access sa
                Entity et = e.target;
                             ^
  class file for sa not found
1 error
1 warning
: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.

BUILD FAILED

Total time: 13.384 secs

F:\ForgeWorkspace>

 

 

 

Anyone know a solution?

Link to comment
Share on other sites

sa

is the Notch (obfuscated) name of the

Entity

class. I have no idea why it can't find the class.

 

Try running

gradlew clean

before building again. If you're still getting the same error, try running

gradlew cleanCache

and setting up your workspace again. Be warned that will delete everything in your Gradle cache, so you'll need to set up every workspace again.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

sa

is the Notch (obfuscated) name of the

Entity

class. I have no idea why it can't find the class.

 

Try running

gradlew clean

before building again. If you're still getting the same error, try running

gradlew cleanCache

and setting up your workspace again. Be warned that will delete everything in your Gradle cache, so you'll need to set up every workspace again.

 

Thanks for the advice!

 

I'll give it a shot....

 

edit: holy hell, it worked. I don't understand how I couldn't have come up with it myself...

 

Thanks a bunch!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.