將gradle升級成最新版本(cd Android 進入android目錄執(zhí)行:sudo ./gradlew clean) 或者通過android studio工具升級. 3.android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? 該錯誤屬于安卓Native的錯誤,如果引用的Activity不存在或者已經(jīng)銷毀,再次...
"run out of its attached activity, yielding WindowManager#BadTokenException if the activity is gone when dismissing"); dialog.setIndeterminate(true); dialog.setCancelable(true); // You MUST do the show in main thread anyway dialog.show(); ...
* Throws {@link android.view.WindowManager.BadTokenException} for certain programming * errors, such as adding a second view to a window without removing the first view. * Throws {@link android.view.WindowManager.InvalidDisplayException} if the window is on a * secondary...
1 ERROR/AndroidRuntime(888): android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRoot$W@44ef1b68 is not valid; is your activity running?報錯的意思大概就是說依賴的Activity沒了。解決方法1 不要在當前的popupWindow里面繼續(xù)show一個popupWindow,應(yīng)該寫一個接口...