-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can no longer compile in Cordova 5.0.0 on Android #535
Comments
I also experience this error. It seems that the methods post(...) and evaluateJavascript(...) are removed from the Cordova 5.0.0 CordovaWebView, and that Katzer's local notification plugin hasn't been updated to reflect these changes. |
Quick fix is to modify the block starting at LocalNotification:492 with the following:
|
+1 for a fix please |
The above changed recommended by nlinksteinar worked for me! I modified this and then re-added the Android plugin to my project and it compiled. |
NOTE: I am not comfortable modifying the code within this project to make the change permanently for others. Perhaps someone could do that?? |
hi, all |
i tried to compile my code with and without crosswalk plugin with no success, i have cordova 5.0.0 and android 4.0.0, y apply the solution proposed by nlinksteinar and i can compile with no problem :D, i modified the code inside the plugin on android project, not on the root (cordova project) c: |
I too am experiencing the webView.evaluateJavascript issue on cordova 5.0, and the fix helps. |
webView.getView().post(new Runnable(){ This fix by nlinksteinar helped. |
+1 @nlinksteinar |
+1 @nlinksteinar 's snippet |
+1 for nlinksteinar... that solve the problem!!! My best...! |
Error with Cordova 5 |
@katzer could you please add the @nlinksteinar 's snippet? |
+1 @nlinksteinar 's snippet . |
Hi the @nlinksteinar's manual patch work in this way: When we try to build Android Cordova App, some errors will marked. webView.getView().post(new Runnable(){ This fix 4 apps that I am creating. My Best! |
+1 |
+1 for nlinksteinar |
+1 for nlinksteinar, and be sure that your editing the right file. |
+1 |
1 similar comment
+1 |
If you look at the latest commit, @nlinksteinar 's suggestions have been merged into master. This should be closed. |
In 8.1 continue the error, we fixed with @nlinksteinar 's suggestions. Please add in the next release. |
symbol: method post() FAILURE: Build failed with an exception.
BUILD FAILED |
Thanks @nlinksteinar. Using |
I'm sorry I'm a bit lost here. I understand that the |
Catch exception Removed duplicate setting of lights Use alpha channel 0 to prevent led from displaying Try to also remove light blink timeout to prevent notification Don't use default sound when sound is set to false Quick fix from katzer#535 Fixed problems with notification plugin dependency namings. Removed smaller than 4.0.0 engine requirement Attempted fix from katzer#495 to prevent notifications from firing again on boot. Fixed adding local notification crashing app on iOS 9. Tested also that with this fix, iOS 8 also still works.
Catch exception Removed duplicate setting of lights Use alpha channel 0 to prevent led from displaying Try to also remove light blink timeout to prevent notification Don't use default sound when sound is set to false Quick fix from katzer#535 Fixed problems with notification plugin dependency namings. Removed smaller than 4.0.0 engine requirement Attempted fix from katzer#495 to prevent notifications from firing again on boot. Fixed adding local notification crashing app on iOS 9. Tested also that with this fix, iOS 8 also still works.
This is still failing for me on Cordova 6. Is there reliable fork I can use with the fix? Or shall I create my own? Thanks!! |
@sdurandeu Now there is a new upgrade for this plugin. Use the next one: https://www.npmjs.com/package/phonegap-plugin-push |
@cagb80 Thanks! My understanding was that Just in case it helps anyone reading, my issue was that the version in NPM of the plugin is quite outdated. Installing it from this repo worked as expected. |
I want Local Notification when app is closed 0r killed but i am getting some problem with webView Can you Please any one help on this ??? |
Is anyone else experiencing this issue? I saw some previous posts that mentioned that the location of the files in Android have moved, however this appears to be a problem with Cordova 5.0.0.
Here is my specific error:
myDir/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
myDir/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.
Note: myDir/platforms/android/src/org/apache/cordova/file/ContentFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
:compileDebugJava FAILED
The text was updated successfully, but these errors were encountered: