The platform "android" does not appear to be a valid cordova platform
CptToucan opened this issue · 4 comments
Been having some issues getting corber start
to work. I've followed the live reload guide for Android builds. I am running Ubuntu 18.04 and I am running into this issue when I run corber start
:
(node:5431) UnhandledPromiseRejectionWarning: Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.')
at CordovaEventEmitter.emit (events.js:198:17)
at CordovaEventEmitter.emit (/home/rob/.nvm/versions/node/v12.10.0/lib/node_modules/corber/node_modules/cordova-common/src/events.js:69:22)
at Object.getPlatformApiFunction (/home/rob/.nvm/versions/node/v12.10.0/lib/node_modules/corber/node_modules/cordova-lib/src/cordova/util.js:384:20)
at Object.getPlatformApi (/home/rob/.nvm/versions/node/v12.10.0/lib/node_modules/corber/node_modules/cordova-lib/src/platforms/platforms.js:55:32)
at /home/rob/.nvm/versions/node/v12.10.0/lib/node_modules/corber/node_modules/cordova-lib/src/cordova/prepare.js:52:38
at Array.map (<anonymous>)
at /home/rob/.nvm/versions/node/v12.10.0/lib/node_modules/corber/node_modules/cordova-lib/src/cordova/prepare.js:50:47
(node:5431) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5431) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:5438) UnhandledPromiseRejectionWarning: Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.')
at CordovaEventEmitter.emit (events.js:198:17)
at CordovaEventEmitter.emit (/home/rob/.nvm/versions/node/v12.10.0/lib/node_modules/corber/node_modules/cordova-common/src/events.js:69:22)
at Object.getPlatformApiFunction (/home/rob/.nvm/versions/node/v12.10.0/lib/node_modules/corber/node_modules/cordova-lib/src/cordova/util.js:384:20)
at Object.getPlatformApi (/home/rob/.nvm/versions/node/v12.10.0/lib/node_modules/corber/node_modules/cordova-lib/src/platforms/platforms.js:55:32)
at /home/rob/.nvm/versions/node/v12.10.0/lib/node_modules/corber/node_modules/cordova-lib/src/cordova/prepare.js:52:38
at Array.map (<anonymous>)
at /home/rob/.nvm/versions/node/v12.10.0/lib/node_modules/corber/node_modules/cordova-lib/src/cordova/prepare.js:50:47
(node:5438) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5438) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
No apk found
No apk found
I also see it when I run corber build
and corber serve
commands.
Any help would be very appreciated as I'm very new to the whole Cordova/Android development thing.
I am seeing a similar issue with corber init
when choosing ios:
? Which platforms should we init with? ios
WARNING: corber
corber initializes ios with the upgraded WKWebView. See http://corber.io/pages/workflow/default_webviews for details and flags
Initializing cordova with upgraded WebView cordova-plugin-wkwebview-engine
(node:33874) UnhandledPromiseRejectionWarning: Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('The platform "ios" does not appear to be a valid ' +
'cordova platform. It is missing API.js. ios not ' +
'supported.')
at CordovaEventEmitter.emit (events.js:189:17)
at CordovaEventEmitter.emit (/Users/eric/.config/yarn/global/node_modules/cordova-common/src/events.js:69:22)
at Object.getPlatformApiFunction (/Users/eric/.config/yarn/global/node_modules/cordova-lib/src/cordova/util.js:384:20)
at Object.getPlatformApi (/Users/eric/.config/yarn/global/node_modules/cordova-lib/src/platforms/platforms.js:55:32)
at handleInstall (/Users/eric/.config/yarn/global/node_modules/cordova-lib/src/plugman/install.js:580:29)
at /Users/eric/.config/yarn/global/node_modules/cordova-lib/src/plugman/install.js:349:28
at processTicksAndRejections (internal/process/task_queues.js:89:5)
(node:33874) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:33874) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Project created
Thanks - just working on a fix to this.
This should be fixed as of 1.4.0.
For those curious, in a lot of cases our old cordova template (https://github.com/isleofcode/ember-cordova-template) was causing issues - especially since the cordova switch to npm. Effectively cordova-ios versions were not being set correctly - which could cause older versions to be pulled down.
I've since deprecated that template as we don't need it so much anymore. Historically it was used to prevent unused cordova assets being installed and today the core cordova project appears to manage that internally.
@alexblom Thanks for fixing! Just incase it was an accident, it doesn't look like the 1.4.0 release was published to npm. I've installed from master for now 😄 Thanks again!