pwlin / cordova-plugin-pdialog

An Android Progress Dialog Plugin for Cordova
MIT License
22 stars 14 forks source link

I get fatal exception whith android 4.2.1 #6

Open hmarina opened 8 years ago

hmarina commented 8 years ago

I am using cordova 5.2.0 and the last plugin pdialog version, in android 4.2.1, and this data in my manifest.xml uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22"

I get fatal exception and my aplication is closed,

W/dalvikvm( 4279): threadid=1: thread exiting with uncaught exception (group=0x40e14930) E/AndroidRuntime( 4279): FATAL EXCEPTION: main E/AndroidRuntime( 4279): java.lang.NullPointerException E/AndroidRuntime( 4279): at io.github.pwlin.cordova.plugins.pdialog.PDialog$2.run(PDialog.java:177) E/AndroidRuntime( 4279): at android.os.Handler.handleCallback(Handler.java:725) E/AndroidRuntime( 4279): at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime( 4279): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime( 4279): at android.app.ActivityThread.main(ActivityThread.java:5039) E/AndroidRuntime( 4279): at java.lang.reflect.Method.invokeNative(NativeMethod) E/AndroidRuntime( 4279): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime( 4279): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroidRuntime( 4279): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroidRuntime( 4279): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 498): Force finishing activity com.phonegap.helloworld/.Ma inActivityW/dalvikvm( 4279): threadid=1: thread exiting with uncaught exception (group=0x40e14930)

pwlin commented 8 years ago

Can you show a javascript example of how are you using this plugin?

msfilho commented 7 years ago

Same error for me.

I'm using like this:

cordova.plugin.pDialog.init({ theme : 'DEVICE_LIGHT', progressStyle : 'SPINNER', cancelable : false, title : 'Wait...', message : 'Loading...' });

cordova.plugin.pDialog.dismiss();