晕死的错误,改了半天也没想到是这样的原因,基础正要呀。。。
先看一下警告信息:
07-07 08:32:19.540: WARN/WindowManager(74): Failed looking up window
07-07 08:32:19.540: WARN/WindowManager(74): java.lang.IllegalArgumentException:Requested window android.os.BinderProxy@450b2f48 does not exist
07-07 08:32:19.540: WARN/WindowManager(74): at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:9293)
07-07 08:32:19.540: WARN/WindowManager(74): at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:9284)
07-07 08:32:19.540: WARN/WindowManager(74): at com.android.server.WindowManagerService.relayoutWindow(WindowManagerService.java:2364)
07-07 08:32:19.540: WARN/WindowManager(74): at com.android.server.WindowManagerService$Session.relayout(WindowManagerService.java:6782)
07-07 08:32:19.540: WARN/WindowManager(74): at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:117)
07-07 08:32:19.540: WARN/WindowManager(74): at com.android.server.WindowManagerService$Session.onTransact(WindowManagerService.java:6743)
07-07 08:32:19.540: WARN/WindowManager(74): at android.os.Binder.execTransact(Binder.java:288)
07-07 08:32:19.540: WARN/WindowManager(74): atdalvik.system.NativeStart.run(Native Method)
Java代码如下:
原因是语句Thread t = new Thread()没有谢参数,因为在实现多线时如果是实现的Runnable接口,必要Thread t = new Thread(Runnable runnable),所以把语句Thread t = new Thread()修改为Thread t = new Thread(this)运行就正确了。
java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@450b2f48 异常处理
原文:http://www.cnblogs.com/123ing/p/3912939.html