記錄個錯誤This window was lost,Rebuild removed 9 windows but added 8
錯誤如下
09-13 17:25:35.895 957-970/? W/WindowManager: Rebuild removed 9 windows but added 8
java.lang.RuntimeException: here
at com.android.server.wm.WindowManagerService.rebuildAppWindowListLocked(WindowManagerService.java:8129)
at com.android.server.wm.WindowManagerService.rebuildAppWindowListLocked(WindowManagerService.java:8065)
09-13 17:25:35.905 957-970/? W/WindowManager: This window was lost: Window{4363d0c0 u0 包名/具體Activity}
mDisplayId=0 mSession=Session{43456588 27252:u0a10304} [email protected]
mOwnerUid=10304 mShowToOwnerOnly=true package=com.md.personnelfiles appop=NONE
mAttrs=WM.LayoutParams{(0,0)(fillxfill) sim=#110 ty=1 fl=#4810100 extfl=#0 pfl=0x8 wanim=0x10302a1 vsysui=0x500}
Requested w=720 h=1280 mLayoutSeq=2812
產生原因
在執行tv_tjx點選事件後,沒加break,繼續執行back()方法,該方法是跳轉activity,於是產生錯誤,程式碼如下,加上break後,錯誤消失。
case R.id.tv_tjx: ed_worknotec.setTextSize(22); case R.id.tv_noteback: back(); break; default: break;
後記,糊里糊塗解決了,沒明白原理,留著有時間再繼續研究。