katzer / cordova-plugin-local-notifications

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

It is not working on android #4

Closed tomswatermelon closed 11 years ago

tomswatermelon commented 11 years ago

I installed it and it is working on iOS, but is not on android;

it produced no error in the code, but the notification doesn't come out as well, any idea?

My environment is cordova 3.1 and android 4.2

Thanks!

This is the error log:

10-29 17:06:53.590: W/System.err(5981): java.lang.ClassNotFoundException: de.appplant.cordova.plugin.LocalNotification 10-29 17:06:53.590: W/System.err(5981): at java.lang.Class.classForName(Native Method) 10-29 17:06:53.590: W/System.err(5981): at java.lang.Class.forName(Class.java:217) 10-29 17:06:53.590: W/System.err(5981): at java.lang.Class.forName(Class.java:172) 10-29 17:06:53.590: W/System.err(5981): at org.apache.cordova.PluginEntry.getClassByName(PluginEntry.java:117) 10-29 17:06:53.590: W/System.err(5981): at org.apache.cordova.PluginEntry.createPlugin(PluginEntry.java:93) 10-29 17:06:53.590: W/System.err(5981): at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:267) 10-29 17:06:53.590: W/System.err(5981): at org.apache.cordova.PluginManager.execHelper(PluginManager.java:221) 10-29 17:06:53.590: W/System.err(5981): at org.apache.cordova.PluginManager.exec(PluginManager.java:216) 10-29 17:06:53.590: W/System.err(5981): at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53) 10-29 17:06:53.590: W/System.err(5981): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method) 10-29 17:06:53.590: W/System.err(5981): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method) 10-29 17:06:53.590: W/System.err(5981): at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCoreJavaBridge.java:92) 10-29 17:06:53.590: W/System.err(5981): at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:108) 10-29 17:06:53.590: W/System.err(5981): at android.os.Handler.dispatchMessage(Handler.java:99) 10-29 17:06:53.590: W/System.err(5981): at android.os.Looper.loop(Looper.java:137) 10-29 17:06:53.590: W/System.err(5981): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:812) 10-29 17:06:53.590: W/System.err(5981): at java.lang.Thread.run(Thread.java:856) 10-29 17:06:53.600: W/System.err(5981): Caused by: java.lang.NoClassDefFoundError: de/appplant/cordova/plugin/LocalNotification 10-29 17:06:53.600: W/System.err(5981): ... 17 more 10-29 17:06:53.600: W/System.err(5981): Caused by: java.lang.ClassNotFoundException: Didn't find class "de.appplant.cordova.plugin.LocalNotification" on path: /data/app/com.dink.mha2013-2.apk 10-29 17:06:53.600: W/System.err(5981): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65) 10-29 17:06:53.600: W/System.err(5981): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 10-29 17:06:53.600: W/System.err(5981): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 10-29 17:06:53.600: W/System.err(5981): ... 17 more 10-29 17:06:53.600: I/System.out(5981): Error adding plugin de.appplant.cordova.plugin.LocalNotification. 10-29 17:06:53.600: D/PluginManager(5981): exec() call to unknown plugin: LocalNotification

katzer commented 11 years ago

I had changed the package name and forgot one line in the plugin.xml.

I have fixed it with 04f3b8343651c2e564e7a2a50f6810c49ca88b56

Thank you!

tomswatermelon commented 11 years ago

Thanks! it is working like a charm now!

tomswatermelon commented 11 years ago

do you think Ican post ur plugin to the phonegap group and let more people use it and make it more perfect, man. it really helps developers with no ios and android knowledge like us alot!:)

katzer commented 11 years ago

Yes, of course you can post it. Thanks!