Problem in compiling for Android Studio

Hello everyone. Need a big help :smiley: , I was compiling the project for android studio and everything was ok until this error appeared

All input files are considered out-of-date for incremental task ‘:libcocos2dx:co
mpileReleaseJavaWithJavac’.
Compiling with JDK Java compiler API.
:libcocos2dx:compileReleaseJavaWithJavac FAILED
:libcocos2dx:compileReleaseJavaWithJavac (Thread[main,5,main]) completed. Took 0
.051 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:libcocos2dx:compileReleaseJavaWithJavac’.
    Could not find tools.jar
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to
    get more log output.

Does any of you know how to repair it?

Thanks for the help.
Have a nice day.

ooh no problem jejej I got the solution :slight_smile:

Could you please share the solution?

Sorry for being late.

Well to solve that problem I had to set the JAVA_HOME environment variable to the directory where the JDK was installed.

In my case, my OS is W8.1, so I had to follow this guide: setting java_home

And then compile in the command prompt as normal using this line:

cocos compile -p android --android-studio