poetic / ember-cli-cordova

A tool for creating hybrid apps using a combination of ember-cli and cordova
MIT License
441 stars 77 forks source link

Failed to install 'cordova-plugin-whitelist' #205

Open grimaldodev opened 7 years ago

grimaldodev commented 7 years ago

Hi, I'm very new using cordova and ember so I try to follow step by step the "Getting started" guide from you but at the step to generate the cordova-init everything crash. I research for the same scenarios in internet but all of them are related with ios, I want to use as android platform let me show my code:

ember generate cordova-init com.nobs.mobile --platform=android

and then:

installing cordova-init
? Overwrite config/environment.js? Yes, overwrite
? Overwrite .gitignore? Yes, overwrite
  overwrite config/environment.js
  overwrite .gitignore
Creating Cordova project...
Using detached cordova-create
Creating a new cordova project.
Creating Cordova project...
Adding android platform to cordova.
Adding android project...
Creating Cordova project for the Android platform:
    Path: platforms/android
    Package: com.nobs.mobile
    Name: Mobile
    Activity: MainActivity
    Android target: android-24
Subproject Path: CordovaLib
Android project created with cordova-android@6.0.0
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for android
Failed to install 'cordova-plugin-whitelist':Error
    at /Volumes/Develop/mobile/cordova/platforms/android/cordova/lib/check_reqs.js:222:19
    at _fulfilled (/Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:796:13)
    at /Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:857:14
    at runSingle (/Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:137:13)
    at flush (/Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
Adding android platform to cordova...

Can you help me please?

samuel012 commented 7 years ago

have you solved this @ivangrimaldo ?

grimaldodev commented 7 years ago

Noup, I stopped the training, I'm learning Swft 3 instead :P

BryanH commented 7 years ago

Failed to find 'android' command in your 'PATH'.

The issue is that Android SDK's tools directory is not in the path. That is what it is complaining about.

rtm commented 6 years ago

@BryanH Why do you believe that the first error is related to or caused by the second?

Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.

I get the first error all by itself.

BrennaEpp commented 4 years ago

This happens to me when I clone from the repo:

Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try 
adding it again. Error: Failed to fetch plugin cordova-plugin-whitelist@^1.3.4 via registry.

This fixed it:

$ cordova plugin add cordova-plugin-whitelist
$ cordova prepare

Note it doesn't work without running cordova prepare

zmilan commented 4 years ago

This happens to me when I clone from the repo:

Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try 
adding it again. Error: Failed to fetch plugin cordova-plugin-whitelist@^1.3.4 via registry.

This fixed it:

$ cordova plugin add cordova-plugin-whitelist
$ cordova prepare

Note it doesn't work without running cordova prepare

@BrennaEpp Thanks, In my case cordova prepare did the job.

BryanH commented 4 years ago

Reopening - problem still exists