Cordova-plugin-local-notifications: Failed to install 'cordova-plugin-local-notification': TypeError: Invalid Version: android-P

Created on 23 Apr 2018  路  5Comments  路  Source: katzer/cordova-plugin-local-notifications

Trying to build platform android error

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-plugin-proxy : 1.5.8
    @ionic/cli-utils        : 1.19.2
    ionic (Ionic CLI)       : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 7.1.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 1.9.2 
    ios-sim           : 6.1.2 
    Node              : v8.9.4
    npm               : 5.6.0 
    OS                : macOS High Sierra
    Xcode             : Xcode 9.2 Build version 9C40b 

"cordova-plugin-local-notification": "^0.9.0-beta.2"

Installed platforms:
android 7.1.0
ios 4.5.4

Error Log:

Installing "cordova-plugin-local-notification" for android

Failed to install 'cordova-plugin-local-notification': TypeError: Invalid Version: android-P
    at new SemVer (/usr/local/lib/node_modules/cordova/node_modules/semver/semver.js:305:11)
    at Range.test (/usr/local/lib/node_modules/cordova/node_modules/semver/semver.js:1112:15)
    at Function.satisfies (/usr/local/lib/node_modules/cordova/node_modules/semver/semver.js:1161:16)
    at checkEngines (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:116:20)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:313:16
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:557:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)

(node:83454) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Invalid Version: android-P
(node:83454) [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.

Most helpful comment

Ok I found solution.. Go to Android SDK Settings in Android studio and remove Android P Preview.

All 5 comments

still looking for the solution .... :(

I have the same problem did u found solution?

Ok I found solution.. Go to Android SDK Settings in Android studio and remove Android P Preview.

@gregg95 cool thanks. it's work...... :)

yes...remove android-P preview ..

Was this page helpful?
0 / 5 - 0 ratings