输入文本并选择该文本时,我的应用程序应用程序将在EditText上崩溃。否则它将正常工作。唯一的问题是通过点击选择文本。我在xml中添加了android:importantForAutofill =“ noExcludeDescendants”仍然无法正常工作。
日志:
2020-07-06 12:15:15.256 21356-21356/com.zz.zzz E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.zz.zzz, PID: 21356
com.android.internal.util.SyncResultReceiver$TimeoutException: Interrupted
at com.android.internal.util.SyncResultReceiver.waitResult(SyncResultReceiver.java:60)
at com.android.internal.util.SyncResultReceiver.getIntResult(SyncResultReceiver.java:68)
at android.view.autofill.AutofillManager.ensureServiceClientAddedIfNeededLocked(AutofillManager.java:1841)
at android.view.autofill.AutofillManager.isEnabled(AutofillManager.java:830)
at android.widget.TextView.canRequestAutofill(TextView.java:11592)
at android.widget.Editor$TextActionModeCallback.populateMenuWithItems(Editor.java:4017)
at android.widget.Editor$TextActionModeCallback.onCreateActionMode(Editor.java:3961)
at com.android.internal.policy.DecorView$ActionModeCallback2Wrapper.onCreateActionMode(DecorView.java:2596)
at com.android.internal.policy.DecorView.startActionMode(DecorView.java:913)
at com.android.internal.policy.DecorView.startActionModeForChild(DecorView.java:869)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1008)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1008)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1008)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1008)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1008)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1008)
at android.view.View.startActionMode(View.java:7339)
at android.widget.Editor.startActionModeInternal(Editor.java:2245)
at android.widget.SelectionActionModeHelper.startActionMode(SelectionActionModeHelper.java:267)
at android.widget.SelectionActionModeHelper.startSelectionActionMode(SelectionActionModeHelper.java:248)
at android.widget.SelectionActionModeHelper.lambda$startSelectionActionModeWithSmartSelectAnimation$0$SelectionActionModeHelper(SelectionActionModeHelper.java:302)
at android.widget.-$$Lambda$SelectionActionModeHelper$xdBRwQcbRdz8duQr0RBo4YKAnOA.run(Unknown Source:4)
at android.widget.SelectionActionModeHelper.startSelectionActionModeWithSmartSelectAnimation(SelectionActionModeHelper.java:310)
at android.widget.SelectionActionModeHelper.lambda$l1f1_V5lw6noQxI_3u11qF753Iw(Unknown Source:0)
at android.widget.-$$Lambda$SelectionActionModeHelper$l1f1_V5lw6noQxI_3u11qF753Iw.accept(Unknown Source:4)
at android.widget.SelectionActionModeHelper$TextClassificationAsyncTask.onPostExecute(SelectionActionModeHelper.java:998)
at android.widget.SelectionActionModeHelper$TextClassificationAsyncTask.onPostExecute(SelectionActionModeHelper.java:952)
at android.os.AsyncTask.finish(AsyncTask.java:755)
at android.os.AsyncTask.access$900(AsyncTask.java:192)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7410)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)