尝试调用接口方法';boolean android.view.inputmethod.InputConnection.finishComposingText()';在空对象引用上-Android Kotlin
当我单击工具栏上的“后退”按钮(如gif所示)时,出现错误:尝试调用接口方法';boolean android.view.inputmethod.InputConnection.finishComposingText()';在空对象引用上-Android Kotlin,android,kotlin,Android,Kotlin,当我单击工具栏上的“后退”按钮(如gif所示)时,出现错误:尝试在空对象引用上调用接口方法“boolean android.view.inputmethod.InputConnection.finishComposingText()”。我认为这是因为关注编辑文本 ====================================================================== 07-20 18:53:58.839 976-13033/?E/android.os.De
尝试在空对象引用上调用接口方法“boolean android.view.inputmethod.InputConnection.finishComposingText()”。我认为这是因为关注编辑文本
======================================================================
07-20 18:53:58.839 976-13033/?E/android.os.Debug:ro.product\u ship=true
ro.debug_级别=0x4f4c
07-20 18:53:59.239 3996-13041/? E/SQLiteLog:(284)崩溃信息摘要的自动索引(包名)
07-20 18:53:59.569 976-1519/? E/ActivityManager:checkUser:useridlist=null,currentuser=0您的代码没有问题。
尝试清理生成缓存。见下图
然后重建您的项目
您还应该尝试删除项目目录中的.gradle文件夹
java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.view.inputmethod.InputConnection.finishComposingText()' on a null object reference
at android.view.inputmethod.InputConnectionWrapper.finishComposingText(InputConnectionWrapper.java:78)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:362)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5912)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)