问题
We have build a Cordova app with the org.apache.cordova.dialogs plugin installed and JQM.
After start (onDeviceReady) we show the dialog using navigator.notification.alert.
Then we press HOME button to return to the home screen and after this we get the following error:
06-17 13:39:22.735: E/WindowManager(498): android.view.WindowLeaked: Activity mobi.appcoins.AppCoins has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{16e65b66 V.E..... R......D 0,0-729,437} that was originally added here 06-17 13:39:22.735: E/WindowManager(498): at android.view.ViewRootImpl.(ViewRootImpl.java:363) 06-17 13:39:22.735: E/WindowManager(498): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:271) 06-17 13:39:22.735: E/WindowManager(498): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85) 06-17 13:39:22.735: E/WindowManager(498): at android.app.Dialog.show(Dialog.java:298) 06-17 13:39:22.735: E/WindowManager(498): at android.app.AlertDialog$Builder.show(AlertDialog.java:993) 06-17 13:39:22.735: E/WindowManager(498): at org.apache.cordova.dialogs.Notification.changeTextDirection(Notification.java:477) 06-17 13:39:22.735: E/WindowManager(498): at org.apache.cordova.dialogs.Notification.access$1(Notification.java:474) 06-17 13:39:22.735: E/WindowManager(498): at org.apache.cordova.dialogs.Notification$2.run(Notification.java:182) 06-17 13:39:22.735: E/WindowManager(498): at android.os.Handler.handleCallback(Handler.java:739) 06-17 13:39:22.735: E/WindowManager(498): at android.os.Handler.dispatchMessage(Handler.java:95) 06-17 13:39:22.735: E/WindowManager(498): at android.os.Looper.loop(Looper.java:135) 06-17 13:39:22.735: E/WindowManager(498): at android.app.ActivityThread.main(ActivityThread.java:5254) 06-17 13:39:22.735: E/WindowManager(498): at java.lang.reflect.Method.invoke(Native Method) 06-17 13:39:22.735: E/WindowManager(498): at java.lang.reflect.Method.invoke(Method.java:372) 06-17 13:39:22.735: E/WindowManager(498): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 06-17 13:39:22.735: E/WindowManager(498): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
来源:https://stackoverflow.com/questions/30886569/the-app-crashes-unable-to-add-window-token-android-os-binderproxy-is-not-val