your programing

안드로이드 스튜디오 3.1 EditText StackOverflowError

lovepro 2020. 12. 30. 19:49
반응형

안드로이드 스튜디오 3.1 EditText StackOverflowError


Android Studio 3.1로 업데이트 한 후 EditText에 포커스가있을 때 예외가 발생합니다.

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)

이 문제를 해결하는 방법을 아십니까?

최신 정보:

몇 가지 연구 끝에 StackOverflowError가 간단한 EditText를 사용하여 다른 스택 추적과 함께 나타남을 발견했습니다.

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

기호를 입력하려고하면 다음이 표시됩니다.

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

뒤로 누르면 :

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에 텍스트를 입력해도이 오류가 발생합니다.

AS 3.0에서 EditText는 정상적으로 작동했습니다.


으로 @evi는 지적이 고급 프로파일에 버그가 .

지금은이를 비활성화 (구성 설정 편집-> 프로파일 링-> 고급 프로파일 링 활성화) 하면 EditText가 충돌하지 않습니다.

최신 정보:

Android Studio 3.1.1 에서 릴리스 된 수정 사항

고급 프로파일 링을 다시 사용할 수 있습니다!


이것은 Android 6.0 기기에서만 발생하는 것으로 보이며 EditText는 Android 5 및 Android 7 기기에서 잘 작동합니다. 실행 구성에서 고급 프로파일 링 비활성화 (API <26)가 저에게 효과적입니다.


Android 5.1.1, 동일한 문제. 새로운 Android Studio의 버그로 보입니다. 고급 프로파일 링을 비활성화하면 디버그 빌드 문제가 해결됩니다.


Android Studio 3.1로 업데이트 한 직후 동일한 EditText 문제에 직면했습니다. 설정하려고 debuggable false에서 build.gradle디버그 빌드 유형. 또는 기본적으로 false이므로 릴리스 빌드 유형으로 전환하십시오. 제 경우에 도움이되었습니다.

업데이트 : 고급 프로파일 링을 비활성화하면 내 문제도 해결되었는지 확인했습니다.


나는 같은 문제가 있었지만 이후 :

  • .idea, .gradle, gradle 폴더를 삭제하고 다시 만듭니다.
  • 깨끗한 프로젝트.
  • 앱을 다시 빌드하십시오.

그것은 나를 위해 작동합니다.

ReferenceURL : https://stackoverflow.com/questions/49512975/android-studio-3-1-edittext-stackoverflowerror

반응형