removeView(View view)
Window Manager にアクセスしようとすると、例外が発生します。
wm = (WindowManager) getSystemService(WINDOW_SERVICE);
AntView mView=new AntView(getApplicationContext());
wm.removeView(mView1);
上記のコードを試すと、例外が表示されます。
Caused by: java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:381)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:226)
at com.example.testactivity.BackService.onStartCommand(BackService.java:63)
0 at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2051)