Skip to content

Instantly share code, notes, and snippets.

@docherty
docherty / fix-cordova-localnotification-plugin.md
Last active August 29, 2015 14:26
This is a fix for the java error thrown when trying to run v0.8.1 of the cordova localNotification plugin

To fix the build error:

..../platforms/android/cordova/plugin/localnotification/LocalNotification.java:495: error: cannot find symbol webView.evaluateJavascript(js, null);

replace the block starting at line 492 in .../plugins/de.appplant.cordova.plugin.local-notification/src/android/LocalNotification.java with this

webView.getView().post(new Runnable(){
  public void run(){
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Mac Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you will see an error like this:

$ npm update npm -g