Android Studio 3.1 EditText StackOverflowError [英] Android Studio 3.1 EditText StackOverflowError

查看:98
本文介绍了Android Studio 3.1 EditText StackOverflowError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新到Android Studio 3.1之后,当EditText成为焦点时,我将面临异常

After updating to Android Studio 3.1 I'm facing exception when EditText in focus

E/AndroidRuntime: FATAL EXCEPTION: main
Process: <package>, PID: 18938
java.lang.StackOverflowError: stack size 8MB
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)
    at android.view.inputmethod.InputConnectionWrapper.getTextBeforeCursor(InputConnectionWrapper.java:46)

知道如何解决这个问题吗?

Any idea how to fix this?

更新:

经过研究后,我发现StackOverflowError出现了带有简单EditText的不同堆栈跟踪:

After some research I found out that StackOverflowError appears with different stacktraces with simple EditText:

<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"/>

尝试输入任何符号时,我会得到:

When trying to enter any symbol I get:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: <package>, PID: 21122
java.lang.StackOverflowError: stack size 8MB
    at android.view.inputmethod.InputConnectionWrapper.beginBatchEdit(InputConnectionWrapper.java:106)

back:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: <package>, PID: 21280
java.lang.StackOverflowError: stack size 8MB
    at android.view.inputmethod.InputConnectionWrapper.finishComposingText(InputConnectionWrapper.java:78)

即使在WebView中输入文本也会导致此错误

Even entering text in WebView causing this error

在AS 3.0中,EditText正常工作

In AS 3.0 EditText's worked normal

推荐答案

@evi 指出存在高级配置文件中的错误

现在将其禁用(编辑配置设置->配置文件->启用高级配置)防止EditText崩溃

For now disabling it (Edit configuration settings -> Profiling -> Enable advanced profiling) prevents EditText from crashing

更新:

修复了 Android Studio 3.1.1

再次提供高级配置!

这篇关于Android Studio 3.1 EditText StackOverflowError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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