TextInputLayout에 래핑 된 TextInputEditText가 있습니다. 그러나 일부 키보드의 경우 사용자가 맞춤법 추천을 사용하고 추천 단어 목록을 표시하기 위해 단어를 탭하면 내 앱이 열악하게 충돌하여 화면에 키보드를 남기고 때로는 대화 상자가 넘쳐납니다.TextInputEditText 맞춤법 교정 충돌?
이것은 Android 6, 7 및 8에서 발생합니다. Google 갤럭시 S5 6.0.1 및 스톡 Samsung 키보드로 실행되지만 Gboard 또는 Swype은 동일한 기기 및 Nexus에서 복제 할 수 없습니다. 기본 Google 키보드를 사용하여 Android 8.0을 실행하는 5 배.
응용 프로그램은 26을 대상으로하며 디자인 지원 라이브러리 버전 26.1.0을 사용하고 있습니다. 이와 같은 스택 추적은 여러 버전의 지원 라이브러리에 걸쳐 우리에게 나타나며, 이와 유사한 문제는 이전에 수정 된 것으로 주장됩니다.
원인을 추적하여 복제하는 것은 꽤 어려웠습니다. 특별한 테마 나 색상을 설정하지 않고 있습니다. 단지 appcompat입니다.
java.lang.UnsupportedOperationException: Failed to resolve attribute at index 6: TypedValue{t=0x2/d=0x101009b a=1}
at android.content.res.TypedArray.getColorStateList(TypedArray.java:484)
at android.text.style.TextAppearanceSpan.<init>(TextAppearanceSpan.java:65)
at android.text.style.TextAppearanceSpan.<init>(TextAppearanceSpan.java:45)
at android.widget.Editor$SuggestionsPopupWindow$SuggestionInfo.<init>(Editor.java:3012)
at android.widget.Editor$SuggestionsPopupWindow$SuggestionInfo.<init>(Editor.java:3007)
at android.widget.Editor$SuggestionsPopupWindow.initContentView(Editor.java:2995)
at android.widget.Editor$PinnedPopupWindow.<init>(Editor.java:2844)
at android.widget.Editor$SuggestionsPopupWindow.<init>(Editor.java:2969)
at android.widget.Editor.showSuggestions(Editor.java:2229)
at android.widget.Editor$2.run(Editor.java:2109)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
여기
내가 찾을 수 있었다 유사/관련 문제가 있어요 :
- Android N crashes in TextAppearanceSpan
- Fatal Exception: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 6: TypedValue{t=0x2/d=0x101009b a=1}
- https://meta.stackexchange.com/questions/292199/android-app-crashes-when-tapping-on-red-underlined-by-the-spell-checker-text-w
불행하게도 그것이 유일한 것 같아 여기에 스택 추적입니다 해결 방법은 T의 모든 사용자에 대해 맞춤법 추천을 사용 중지하는 것입니다. extInputEditText 필드는 꽤 절름발이입니다. 나는 다른 아이디어/제안에 열려 있습니다. 내 경우
내 테마는 Theme.AppCompat.Light.DarkActionBar를 확장합니다. 나는 Theme.AppCompat.Light, Theme.AppCompat, Theme.Design 및 Theme.Design.Light를 시도했으며 충돌은 모두 동일하다. – Mark
해결 방법은 https://stackoverflow.com/questions/41727729#47242474를 참조하십시오. 추천 단어를 사용 중지 할 필요가 없습니다. –
@ Mr-IDE이 문제를 해결하는 데 도움이되는 내용이 없습니다 (필자의 경우에는 적어도). 내 대답에 언급했듯이, TextApperance.AppCompat을 스타일의 부모로 적용하고 hintTextAppearance 대신 테마로 사용했기 때문입니다. – Mark