I am having a similar experience as this issue in the old forum. I am trying to run Gradle on a corporate Windows 7 machine and keep getting JNA errors. Here is the command I am running.
C:\dev\tools>"C:\Program Files\Java\jdk1.7.0_55\bin\java.exe" -Dorg.gradle.native=false -Dorg.gradle.appname=gradle -classpath C:\dev\tools\gradle-2.3\lib\gradle-launcher-2.3.jar org.gradle.launcher.GradleMain -v --debug --stacktrace
12:33:37.334 [ERROR] [org.gradle.BuildExceptionReporter]
12:33:37.334 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:33:37.334 [ERROR] [org.gradle.BuildExceptionReporter]
12:33:37.334 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
12:33:37.334 [ERROR] [org.gradle.BuildExceptionReporter] com.sun.jna.Native.sizeof(I)I
12:33:37.350 [ERROR] [org.gradle.BuildExceptionReporter]
12:33:37.350 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
12:33:37.350 [ERROR] [org.gradle.BuildExceptionReporter] java.lang.UnsatisfiedLinkError: com.sun.jna.Native.sizeof(I)I
12:33:37.350 [ERROR] [org.gradle.BuildExceptionReporter] at com.sun.jna.Native.sizeof(Native Method)
12:33:37.350 [ERROR] [org.gradle.BuildExceptionReporter] at com.sun.jna.Native.<clinit>(Native.java:110)
12:33:37.350 [ERROR] [org.gradle.BuildExceptionReporter] at org.fusesource.jansi.internal.Kernel32.<clinit>(Kernel32.java:33)
12:33:37.350 [ERROR] [org.gradle.BuildExceptionReporter] at org.fusesource.jansi.WindowsAnsiOutputStream.<clinit>(WindowsAnsiOutputStream.java:47)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.nativeplatform.console.WindowsConsoleDetector.getConsole(WindowsConsoleDetector.java:28)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.logging.internal.ConsoleConfigureAction.execute(ConsoleConfigureAction.java:32)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.logging.internal.ConsoleConfigureAction.execute(ConsoleConfigureAction.java:27)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.logging.internal.OutputEventRenderer.attachConsole(OutputEventRenderer.java:68)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.logging.internal.DefaultLoggingManager.attachConsole(DefaultLoggingManager.java:146)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:168)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:46)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
12:33:37.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:37)
12:33:37.381 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
12:33:37.381 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
12:33:37.381 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
12:33:37.381 [ERROR] [org.gradle.BuildExceptionReporter]
My user owns the Gradle directory and has full permissions.
The /dev/tools directory is proper location for installing development tools based on the policy.
I get similar errors when running prior versions of Gradle including 1.12.
Moving Gradle to other directories does not help.
I can run the same command successfully as an administrator but I can not develop as an administrator.
Tried installing the wrapper as an administrator but my user can’t run gradlew. Same error.
The problem is I don’t know what is needed to relax permissions to allow Gradle to run. I am using the Gradle wrapper so I believe the directory is in my home directory. I have taken the sledge hammer approach and have recursively updated the ownership and granted full control.
I came across the UnsatisfiedLinkError in my enterprise and fixed it by setting my Windows temp directory to a location that had the correct permissions to run executables.