katzer / cordova-plugin-local-notifications

Cordova Local-Notification Plugin
Apache License 2.0
2.57k stars 1.76k forks source link

Android build fails #384

Closed sunsus closed 9 years ago

sunsus commented 9 years ago

Hello

The dev Version fails to build for android: platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java:241: error: cannot find symbol [javac] options.setInitDate(); [javac] ^ [javac] symbol: method setInitDate() [javac] location: variable options of type Options platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java:242: error: method schedule in class NotificationWrapper cannot be applied to given types; [javac] nWrapper.schedule(options); [javac] ^ [javac] required: de.appplant.cordova.plugin.notification.Options [javac] found: de.appplant.cordova.plugin.localnotification.Options [javac] reason: actual argument de.appplant.cordova.plugin.localnotification.Options cannot be converted to de.appplant.cordova.plugin.notification.Options by method invocation conversion platforms/android/src/de/appplant/cordova/plugin/localnotification/Receiver.java:67: error: constructor NotificationBuilder in class NotificationBuilder cannot be applied to given types; [javac] NotificationBuilder builder = new NotificationBuilder(options,context,OPTIONS, [javac] ^ [javac] required: de.appplant.cordova.plugin.notification.Options,Context,String,Class<?>,Class<?> [javac] found: de.appplant.cordova.plugin.localnotification.Options,Context,String,Class,Class [javac] reason: actual argument de.appplant.cordova.plugin.localnotification.Options cannot be converted to de.appplant.cordova.plugin.notification.Options by method invocation conversion

PKnittel commented 9 years ago

Try to remove android with: cordova platform rm android and add it again with: cordova platform add android

That should fix your build error.

zmandel commented 9 years ago

if you do a clean build, it works. no need to remove the entire android.

sunsus commented 9 years ago

Clean command can be found here: ~/Desktop/work/project/platforms/android/cordova/clean

alidavut commented 9 years ago

I had this issue, updated cordova. It works now. npm update cordova -g

katzer commented 9 years ago

The new 0.8.x release is a complete rewrite. If the issue still exists please reopen it.

You may also take a look into the new wiki.

Thanks!