随机关闭应用程序 - InputManagerService:GOT的RemoteException发送SETACTIVE(假)的通知 [英] Randomly closing app - InputManagerService: Got RemoteException sending setActive(false) notification

查看:1729
本文介绍了随机关闭应用程序 - InputManagerService:GOT的RemoteException发送SETACTIVE(假)的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的 Android版应用,类似于fingerpaint应用。我
在屏幕上画一些线条与我的手指。

I've a very simple Android app, similar to fingerpaint application. I'm drawing some lines on the screen with my finger.

我的问题是,应用程序会自行关闭随机,带我回
Android主屏幕。

My problem is that, app closes itself randomly, taking me back to Android home screen.

只有登录我能在LogCat中看到的是该行:

Only log I can see on LogCat is that line:

(Warning) Tag: InputManagerService: Got RemoteException sending setActive(false) notification to pid 4962 uid 10077.

没有异常。

我试着编译项目针对的Andr​​oid 2.0,2.1和2.2 ...

I've tried compiling project against Android 2.0, 2.1 and 2.2...

我试过清单中禁用调试的属性。

I've tried disabling debuggable attribute in manifest.

我有两个Nexus One和2.2模拟器这个问题。

I'm having this problem on both Nexus One and 2.2 Emulator.

推荐答案

我的问题是Canvas对象上绘制来自2个不同的线程。

My problem was drawing on Canvas object from 2 different threads.

我被玩弄Android的SDK FingerPaint.java样本,它的内onTouchEvent访问画布。不过,我还使用SurfaceView和我的动画线程中的绘图画布。

I was playing around Android's FingerPaint.java SDK sample and it's accessing Canvas within onTouchEvent. However I was also using SurfaceView and drawing on Canvas within my animation thread.

因此​​去除onTouchEvent(主要应用线程)Canvas对象访问的解决我的问题

Therefore removing Canvas object access from onTouchEvent(main app thread) solved my problem.

感谢。

这篇关于随机关闭应用程序 - InputManagerService:GOT的RemoteException发送SETACTIVE(假)的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆