registerShutdownFunction Error

Hi guys,
My app is running on browser with no issue, when I want to render it on My Android I get error. ( ionic 3 )

Here is my log:

[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: '/Users/hman/Sites/pbr_app', local: false, binPath:
        '/Users/hman/.nvm/versions/node/v8.2.1/lib/node_modules/ionic/bin/ionic', libPath:
        '/Users/hman/.nvm/versions/node/v8.2.1/lib/node_modules/ionic/dist/index.js' }
[WARN] Detected @ionic/cli-plugin-cordova in your package.json.

       As of CLI 3.8, it is no longer needed. You can uninstall it:

       npm uninstall --save-dev --save-exact @ionic/cli-plugin-cordova

[WARN] Detected @ionic/cli-plugin-ionic-angular in your package.json.

       As of CLI 3.8, it is no longer needed. You can uninstall it:

       npm uninstall --save-dev --save-exact @ionic/cli-plugin-ionic-angular

[INFO] Running app-scripts build: --platform android --target cordova

[07:31:02]  build dev started ...
[07:31:02]  clean started ...
[07:31:02]  clean finished in 3 ms
[07:31:02]  copy started ...
[07:31:02]  transpile started ...
[07:31:04]  transpile finished in 2.74 s
[07:31:04]  preprocess started ...
[07:31:04]  deeplinks started ...
[07:31:04]  deeplinks finished in 130 ms
[07:31:04]  preprocess finished in 130 ms
[07:31:04]  webpack started ...
[07:31:05]  copy finished in 3.22 s
[07:31:12]  webpack finished in 7.30 s
[07:31:12]  sass started ...
[07:31:13]  sass finished in 1.52 s
[07:31:13]  postprocess started ...
[07:31:13]  removed unused font files
[07:31:13]  postprocess finished in 83 ms
[07:31:13]  lint started ...
[07:31:13]  build dev finished in 11.80 s
> cordova run android
ANDROID_HOME=/Users/hman/android-sdks
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
Error: spawn EACCES
[ERROR] An error occurred while running cordova run android (exit code 1).

[07:31:16]  lint finished in 2.47 s
[DEBUG] registerShutdownFunction process.exit/normal shutdown

Hi, did you find a solution? I’m having the same issue when using --release flag to run the app:

[ERROR] An error occurred while running cordova run android --release (exit code 1).
[DEBUG] registerShutdownFunction process.exit/normal shutdown

No still nothing. I am still developing the application. I might get back to this. It might be the version of my Android on my machine. I might need to update my android version before I render the application again.

What’s the exactly commands you are using?

Is ionic cordova requirements happy?
What is your ionic info output?

I discover that the problem only happens when using the run command, not with build. Try it and tell me if the same happens to you.

So I ran ionic cordova requirements and I fixed all of the requirements.

Now when I run cordova run android I get the following error:

ANDROID_HOME=/Users/hman/android-sdks
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
Error: spawn EACCES