EddyVerbruggen / nativescript-local-notifications

:mailbox: NativeScript plugin to easily schedule local notifications
MIT License
162 stars 57 forks source link

Error in LocalNotifications.schedule: TypeError: Cannot read property 'class' of undefined #75

Closed IvanRybintsev closed 6 years ago

IvanRybintsev commented 6 years ago

In my app i'am try this code

var LocalNotifications = require("nativescript-local-notifications"); LocalNotifications.schedule([{ id: 1, title: 'The title', body: 'Recurs every minute until cancelled', at: new Date(new Date().getTime() + (10 * 1000)) // 10 seconds from now }]).then( function() { console.log("Notification scheduled"); }, function(error) { console.log("scheduling error: " + error); } ) In home-view-model.js but i have issue "Error in LocalNotifications.schedule: TypeError: Cannot read property 'class' of undefined". What can be wrong?

radu2501 commented 6 years ago

I had the same issue and I fixed it by running tns platform remove android && tns run android.

IvanRybintsev commented 6 years ago

thx it's work

Dorgam commented 6 years ago

yup @radu2501 solution fixes it, thanks :)