问题
02-12 18:48:57.049: E/InputQueue-JNI(4659): channel '2be9da40 com.forwardapps.liveItems.LiveItemsService (client)' ~ Publisher closed input channel or an error occurred. events=0x8
I'm getting this error in Ice Cream Sandwidth(ICS)
whenever I set my livewallpaper as the background. It works fine on all other versions of android.
Does anyone know what's going on here or could they explain it?
回答1:
Are you actually seeing a problem, or just being troubled by the error message? This message is printed I believe when the client side of the input event pipe fails because the server has closed the connection. This could happen for example if you don't close a window when your activity is being destroyed.
回答2:
Place a try, catch block around the code that draws the canvas.
More specifically:
Canvas canvas = null;
try {
canvas = _surfaceHolder.lockCanvas(null);
synchronized (_surfaceHolder)
{
onDraw(canvas);
}
if(canvas != null)
{
_surfaceHolder.unlockCanvasAndPost(canvas);
}
} catch (Exception e) {
e.printStackTrace();
}
来源:https://stackoverflow.com/questions/9251649/publisher-closed-input-channel-or-an-error-occurred-events-0x8