Build Ionic on MAC: When adding plugin says " Requirements check failed for JDK 1.8 or Greater" but already installed

Asked

Viewed 308 times

1

When I add the Ios platform on Mac, it gives the message that the codova file tranfer plugin has not been installed, to try with --force.

But when installing with the command:

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

I don’t know what it could 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
  • 1

    What may be happening is that you have more than one installed version and the one that is by default is not the 1.8 ... Execute the command javac -version to know which version is by default. See documentation of Java

  • is resulting javac 9.0.1

  • 1

    See if reinstalling is the case 10 JDK 8 Installation for OS X

  • It worked. I had to download Java from Apple Apps, Oracle gave this error.

  • 1

    Put as answer, step by step if possible.

1 answer

1


You need to install the Java version of the Apple Store, it cannot be direct from the Oracle website and install Cocoa.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.