I was just trying to get gradle running to try it out, but have hit some issues - I’m fairly sure its related to the setup here at work, but any suggestions on where to go next would be greatfully received.
I’ve tried with both gradle 2.14.1 and 3.0-rc-2, and had the same issue with both. Running on Windows 7, 64bit OS. And using a 64 bit JDK 1.8.0_45.
When I run gradle I get the response:
FAILURE: Build failed with an exception.
* What went wrong:
Failed to load native library ‘native-platform.dll’ for Windows 7 amd64.
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Adding the --debug etc. options doesn’t make any difference. I tried clearing out my .gradle/native directory, but it made no difference (i.e. a new dll was put in place, but got the same output).
So are there any thoughts on why the library can’t be loaded? Or can I run without the native library?
Thanks in advance for any thoughts/advice,
Hi @mattharr, did you ever find a solution to this?
I’m hitting the same issue, except my configuration is a bit more complex:
- Running Windows 7, 64bit OS
- Using a 32 bit JDK 1.8.0_92
- Running from a cygwin shell
Accordingly I get:
Failed to load native library 'native-platform.dll' for Windows 7 x86.
However when I use a 64-bit JDK I don’t see this - so I probably need to post a new topic, but I thought I’d try my luck here first just in case.
Incidentally I discovered a few posts on SO which didn’t help me, but there might be some clues for you in there:
(I had to escape the 2nd link due to a possible forum bug.)
No I’m afraid not, I think I read that stack overflow post, and did try fiddling around with the dlls, but had no luck getting it working. I have a feeling its related to the various ‘security’ measures installed on the work machines - I’ve had it working fine on my home machine.
So sorry no further insights (I ended up going with Maven).
Remove the /native subfolder from ~/.gradle
just a quick addendum here.
Had a very similar/same error msg. while working with Eclipse and import of a big Gradle project. Finally my only issue was that GRADLE_USER_HOME was not set correctly resp. to any existing directly. That was all.
‘directly’ --> ‘directory’
Oh interesting, in my case I guess it’s possible it arose by importing something into Eclipse, if Buildship configured something that then confused Gradle in my cygwin environment. This issue “resolved itself” (after me having stumped for many hours) quite early on after starting-out with Gradle. At some point I did customise my
GRADLE_USER_HOME (in both Eclipse prefs and my console init scripts). However that’s so long ago now that I can’t confirm any connection between these things - other than noting it would be consistent with @raduis2’s solution above.
In my case, the issue got resolved by setting gradle path only under System variable=> Path and removing the gradle path variable in other places.