Local Notification, Problem installing


Hello, I appreciate your help whit this problem.

I’m trying to install the plugin $cordovaLocalNotification,
Command line:
cordova plugin add de.appplant.cordova.plugin.local-notification.

And I’m getting this error:

:compileDebugJava/Users/catalina10/Dropbox/catalina/unimedicos_app/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java:495: error: cannot find symbol
webView.evaluateJavascript(js, null);
symbol: method evaluateJavascript(String,)
location: variable webView of type CordovaWebView
/Users/catalina10/Dropbox/catalina/unimedicos_app/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java:492: error: cannot find symbol
webView.post(new Runnable(){
symbol: method post()
location: variable webView of type CordovaWebView
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:compileDebugJava’.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Total time: 10.554 secs

throw e;
Error code 1 for command: /Users/catalina10/Dropbox/catalina/unimedicos_app/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/catalina10/Dropbox/catalina/unimedicos_app/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /Users/catalina10/www/catalina/unimedicos_app/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /Users/catalina10/www/catalina/unimedicos_app/platforms/android/cordova/build: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

My system information:

Cordova CLI: 5.1.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.0.0
Ionic CLI Version: 1.6.4
Ionic App Lib Version: 0.3.8
ios-deploy version: 1.7.0
ios-sim version: 3.1.1
OS: Mac OS X Yosemite
Node Version: v0.12.7
Xcode version: Xcode 6.4 Build version 6E35b


Looks like a known issue: https://github.com/katzer/cordova-plugin-local-notifications/issues/426

It was fixed 12 days ago, so either you use the davidpiegza fork or you wait for merge.


Thank you for your help.
I find this command line:

Use the following command to always use the latest version of the plugin:
$ cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications

Now is compiling. :wink:


OK but you should be careful because it means you use the latest commit in their git repo and it could bring regressions as these changes have not been officially released. It should be only temporary until their next release.


Ok, i will take care.
Thank you very much. :wink:


I have tried the following:

cordova plugin add https://github.com/davidpiegza/cordova-plugin-local-notifications


ionic build android

and I get the following error:

com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;

Any idea?


Yes contact the authors of the plugin on github


I’ve found the issue (with pushPlugin): simply removing the android-support-v4.jar from the android/libs allowed me to build.

See https://github.com/katzer/cordova-plugin-local-notifications/issues/497