专注于editText导致崩溃 [英] focus on editText result in crash

查看:206
本文介绍了专注于editText导致崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一种非常不寻常的行为:

I'm experiencing a really unusual behavior:

从今天开始(不进行样式,Gradle或布局更改),每次我单击EditTextTextInputEditText(仅将焦点设置在它们上)时,应用程序都会崩溃,并显示以下错误:

From today (no style, Gradle or layout changes done), every-time I click on an EditText or TextInputEditText (just set focus on them), the app crashes with the following error:

java.lang.ClassCastException:java.lang.ref.SoftReference不能为 强制转换为android.view.inputmethod.InputConnection 在 com.android.tools.profiler.support.profilers.EventProfiler $ InputConnectionHandler.run(EventProfiler.java:330) 在java.lang.Thread.run(Thread.java:833)

java.lang.ClassCastException: java.lang.ref.SoftReference cannot be cast to android.view.inputmethod.InputConnection at com.android.tools.profiler.support.profilers.EventProfiler$InputConnectionHandler.run(EventProfiler.java:330) at java.lang.Thread.run(Thread.java:833)

我在网上搜索,但没有找到任何类似的东西,此刻我真的不知道该怎么做.

I searched on the net and I didn't find anything similar and at the moment I'm really without any idea.

我在装有 Android 6.0 的两种不同的华为设备上进行了尝试,都导致崩溃.

I tried it on two different Huawei devices with Android 6.0 and both result in a crash.

如果我在手机( Oneplus 3,Android 7 )上运行它,则没有错误,并且该应用程序可以正常运行.

If I run it on my phone (Oneplus 3, Android 7) I have no errors and the app works correctly.

我尝试过的事情:

  • 更改布局,其中一个崩溃了
  • 添加未设置任何属性的简单EditText
  • 删除所有代码,并保留Activity空白"
  • 清理一些未使用的gradle引用
  • 从手机上卸载应用程序
  • 重启手机
  • 无效
  • Changing the layout, one of those who were crashing
  • Adding a simple EditText with no attributes set
  • Removing all code and leaving the Activity "blank"
  • Cleaning some gradle unused references
  • Uninstalling app from phone
  • Rebooting phone
  • Invalidating

没有一个解决方案有效.我的应用程序怎么了?

Not a single solution worked. What is happening to my application?

谢谢

推荐答案

我遇到了同样的问题,我的手机也是装有Android 6.0的华为.您应该设置android studio并在设置"中关闭android profiler.我希望可以帮助您.

I had the same issue,my mobile is also Huawei with Android 6.0.You should set up android studio and close the android profiler in Settings.I wish that can help you .

这篇关于专注于editText导致崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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