在LG擎天柱的EditText怪异崩溃瓦特/ Swype输入(可在仿真器和机器人) [英] EditText weird crash on LG Optimus w/Swype (works on emulator and Droids)

查看:325
本文介绍了在LG擎天柱的EditText怪异崩溃瓦特/ Swype输入(可在仿真器和机器人)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有在模拟器和Droid的手机工作的应用程序。

I have an app which works in the emulator and on Droid phones. While testing on an LG Optimus (which BTW has Swype installed) it crashes with the following stack trace (NOTE: it is in the constructor of EditText).

什么是奇怪的是,在TextView的假设问题的行(981),是用于 getDefualtView方法签名(),而且在2.2的EditText或TextView中以GestureDetector没有引用来源$ C ​​$ C。

What is weird is that supposed offending line in TextView (981) is the method signature for getDefualtView() and there are no references to GestureDetector in EditText or TextView in 2.2 source code.

我是presuming(或hazarding猜测,这很可能是由于Swype的),我不肯定的:

I'm presuming (or hazarding a guess that it is most likely due to Swype) and am not sure of:


  1. 如果是Swype的,那我怎么
    写我的code,使其了Swype
    友好吗?

  2. ,如果它不SWYPE,
    那么什么可能呢?什么是
    莫名其妙的是,它是在
    构造使用默认样式,
    设置为null属性。

任何帮助是AP preciated。

any help is appreciated.

最亲切的问候,
的S -

Kindest regards, S-

- 堆栈跟踪喀嚓 -

-- stacktrace snip --

05-26 12:28:23.440: ERROR/AndroidRuntime(11912): Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at android.os.Handler.<init>(Handler.java:121)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at android.view.GestureDetector$GestureHandler.<init>(GestureDetector.java:250)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at android.view.GestureDetector.<init>(GestureDetector.java:370)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at android.view.GestureDetector.<init>(GestureDetector.java:347)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at android.view.GestureDetector.<init>(GestureDetector.java:331)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at android.widget.TextView.<init>(TextView.java:981)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at android.widget.EditText.<init>(EditText.java:55)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at android.widget.EditText.<init>(EditText.java:51)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at android.widget.EditText.<init>(EditText.java:47)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at com.mobiapps.android.gui.EditTextImpl.<init>(EditTextImpl.java:28)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at com.mobiapps.android.gui.TextFieldImpl.makeTextView(TextFieldImpl.java:23)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at com.mobiapps.android.gui.ToolkitImpl.createTextField(ToolkitImpl.java:429)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at com.mobiapps.android.gui.ToolkitImpl.createWidgets(ToolkitImpl.java:492)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at com.mobiapps.android.gui.ToolkitImpl.initializeContainer(ToolkitImpl.java:555)
05-26 12:28:23.440: ERROR/AndroidRuntime(11912):     at com.mobiapps.common.gui.WidgetContainer.initializeImpl(WidgetContainer.java:88)

- 结束堆栈跟踪 -

-- end stack trace --

块引用

推荐答案

我看着来源,似乎调用活套。prepare()在UI线程会解决这个问题exeption。但是,这是非常奇怪的。您是否使用多线程?

I looked into sources and it seems that invoking Looper.prepare() in the UI thread will fix this exeption. But it's very strange. Are you using multiple threads?

这篇关于在LG擎天柱的EditText怪异崩溃瓦特/ Swype输入(可在仿真器和机器人)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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