• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Cant build for android - Task :library:compileDebugJavaWithJavac FAILED

D

dialc4

Guest
Hi,

I already reinstall have but still have this problem, I cant meke it work with the new version of GM2.


Task :library:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':library:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_261 contains a valid JDK installation.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 10s
22 actionable tasks: 1 executed, 21 up-to-date


C:\Windows\system32\cmd.exe DONE (1)
C:\Windows\system32\subst.exe /d W:


C:\Windows\system32\subst.exe DONE (0)
Error : Build Failed
Igor complete.
 

FoxyOfJungle

Kazan Games
Did you follow this tutorial?

Did you use the Command Line or Android Studio?
 
You're pointing to the wrong Java install. You need to install jdk 1.8 and change the path in preferences to point to that install folder. "jre" is the wrong thing to use.

Download it from here : https://www.oracle.com/uk/java/technologies/javase/javase-jdk8-downloads.html
Hey I have the same issue and this makes sense.. but didn't it state in the guide following https://help.yoyogames.com/hc/en-us/articles/115001368727-Setting-Up-For-Android

"You do not need to install a JDK separately, so please don't just grab the latest version of Oracle Java just because. (Google recommend you use the copy they ship anyway, but also Oracle changed their licence for Java, which means you may now need to pay for commercial app development usage, so it's best to avoid that and stick with Google's tools...)"

So why should you download is separately? you should use the one google provided..
 

rIKmAN

Member
So why should you download is separately? you should use the one google provided..
You shouldn't, you're replying to a thread that is a year old.

Just follow the guide, check and double check the what versions of things you installing against the Required SDKs article linked in the guide, follow it through slowly step by step and everything should work as expected.

I went through Android setup from scratch earlier tonight and the guide is all you need to get things working.
 
You shouldn't, you're replying to a thread that is a year old.

Just follow the guide, check and double check the what versions of things you installing against the Required SDKs article linked in the guide, follow it through slowly step by step and everything should work as expected.

I went through Android setup from scratch earlier tonight and the guide is all you need to get things working.
sorry.. I didnt know the rules and was informed by admin.. this thread popped up in google was was relevant to the issue I had.. and saw that no one corrected the latest post.. So I replied it.. now I know not do that and oyu made things more clear.. thanks!
 
Top