Failed to load native library 'native-platform.dll' for Windows 10 amd64


#1

When trying to run ionic run android command, I get the following error message:
“Failed to load native library ‘native-platform.dll’ for Windows 10 amd64.”

Just find out that this issue also occurs if I follow with the getting started with ionic guide.

Full error log (same with --info/debug/stacktrace)

ANDROID_HOME=C:\Users\Noga\AppData\Local\Android\android-sdk

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_121

Subproject Path: CordovaLib



FAILURE: Build failed with an exception.

* What went wrong:
Failed to load native library 'native-platform.dll' for Windows 10 amd64.

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

Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Failed to load native library 'native-platform.dll' for Windows 10 amd64.

#2

Huh that’s a strange one.

Here is a hint what could cause this:

How did you install gradle/Android stuff?


#3

I got the same error for ionic cordova build android -prod

    ANDROID_HOME=C:\Users\sandu\AppData\Local\Android\sdk
    JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144
    Subproject Path: CordovaLib

    FAILURE: Build failed with an exception.

    * What went wrong:
    Failed to load native library 'native-platform.dll' for Windows 10 amd64.

$ ionic -v
3.12.0

P.S. - fixed by removing native folder from: C:\Users\UserName\.gradle check this

"