Android Gradle cannot find "tools.jar"

Hi, I have problems running android with the latest version of haxe and I have these updates:

actuate: [1.8.7]
box2d: [1.2.3]
createjs: [1.5.8]
extension-android-support-v4: [1.0.0]
extension-googleplaygames: 1.4.0 [1.5.7]
extension-googleplayservices-basement: [1.1.0]
extension-googleplayservices-lib: 1.1.0 [1.1.1]
extension-locale: 1.0.1 [1.0.3]
extension-share: 2.4.2 [2.4.3]
haxe-ga: 0.5.2 [0.5.3]
HaxePunk-nape: [1.0.1]
HaxePunk: 2.5.3 [2.5.6] 2.6.1 git
hxcpp: 3.2.180 3.3.49 3.4.64 [3.4.188]
layout: [1.2.1]
lime-samples: 2.6.0 [4.0.1]
lime-tools: [1.5.7]
lime: 2.1.3 2.5.2 5.4.0 [5.9.1]
mapsheet: [1.0.0]
nape: [2.0.20]
openfl-ouya: [1.0.2]
openfl-samples: [6.0.0]
openfl-share: [1.2.2]
openfl-unityads: 1.0.3 [1.0.7]
openfl: 2.2.8 3.2.2 6.1.0 [6.5.3]
samcodes-admob: [1.0.9]
samcodes-chartboost: 1.0.1 1.0.4 [1.0.9]
spritesheet: [1.2.0]

But I get this error and I don’t know what to do, any suggestions?

:deps:extension-api:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:deps:extension-api:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':deps:extension-api:compileReleaseJavaWithJavac'.
> Could not find tools.jar

I also have everything updated with the android SDK

Maybe there’s some problem with the Java install on that machine. What version do you have on that computer ?

java version “9.0.1”

Does it have the JAVA_HOME set pointed to the proper directory where java jdk is installed ?

I’ve got it this way, but I don’t know if it’s well configured.

Only difference I can see is that I have it in the upper half, the user variables and you have it on the lower panel for system variables. But that probably ain’t it. I am kind of lost here. Everything seems to be ok prima facie.
Did you use to be able to compile to android before and was there some change and suddenly it didn’t work anymore, and that was the haxe version update alone ? You said the latest version of haxe, meaning 3.4.4 and not the previews right ?

I’ve been using haxe 3.2.2 for a long time due to incompatibilities of some extensions, but I’m trying to make a framework of my own with all the latest updates…

but since I installed the last haxe I haven’t been able to compile android.

flash, html5 and neko works for my right now using only this libraries in the project:

<haxelib name="openfl" />
<haxelib name="actuate" />
<haxelib name="mapsheet" />

So ‘openfl setup android’ worked just peachy but somehow the process ain’t working when you compile now.

I didn’t notice but I have the version of jdk 8 in something affects the project?

It is that one of the tests was to update the jdk to 9 but it didn’t recognize the java. this is the error that shows when i changed for the folder jdk9

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '9.0.1'.

I’m using jdk-8u151-windows-x64.exe, maybe you could test install something older to your current version and see if it picks it up and corrects the problem.

Thanks at least I was able to compile in debug :slight_smile: :smiley:

1 Like

I ran into the same problem attempting to run the BunnyMark sample on a fresh computer.
The solution was to roll back to JDK 8 and add the following line to the ‘’ file in the lime haxelib folder (as well as update the environment variable):\_sdks\jdk64\