Compiling Ionic on MAC: Adding plugin says "Requirements check failed for JDK 1.8 or greater" but already installed

1

When I add the iOS platform on the Mac, it gives the message that the file transfer plugin was not installed, to try with -force.

But when installing with the command:

cordova plugin rm cordova-plugin-file-transfer --force

Give the following error, I do not know what it might be:

cordova plugin rm cordova-plugin-file-transfer --force
Uninstalling cordova-plugin-file-transfer from android
Uninstalling cordova-plugin-file-transfer from ios
Removing "cordova-plugin-file-transfer"
Removing plugin cordova-plugin-file-transfer from config.xml file...
Removing cordova-plugin-file-transfer from package.json
Mini-de-Andre:vovocooks-v10 andregnvlima$ cordova plugin add cordova-plugin-file-transfer --force
Installing "cordova-plugin-file-transfer" for android
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on android.
ANDROID_HOME=/Users/andregnvlima/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
Failed to install 'cordova-plugin-file-transfer': CordovaError: Requirements check failed for JDK 1.8 or greater
    at /Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/lib/check_reqs.js:367:19
    at _fulfilled (/Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (/Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:816:13)
    at /Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:624:44
    at runSingle (/Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:137:13)
    at flush (/Users/andregnvlima/app/vovocooks-v10/platforms/android/cordova/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
Error: Requirements check failed for JDK 1.8 or greater
    
asked by anonymous 26.10.2017 / 01:53

1 answer

1

You need to install the Java version of the Apple Store, it can not be direct from the Oracle site and install Cocoa.

    
26.10.2017 / 18:10