我将手机从8.0更新到8.1,现在当我尝试在我的应用程序(使用API级别25构建)上点击任何EditText或com.rengwuxian.materialedittext.MaterialEditText时,我遇到了这个崩溃.
FATAL EXCEPTION: main
java.lang.NullPointerException: activityToken
at android.os.Parcel.readException(Parcel.java:2010)
at android.os.Parcel.readException(Parcel.java:1950)
at android.view.autofill.IAutoFillManager$Stub$Proxy.startSession(IAutoFillManager.java:381)
at android.view.autofill.AutofillManager.startSessionLocked(AutofillManager.java:993)
at android.view.autofill.AutofillManager.notifyViewEntered(AutofillManager.java:595)
at android.view.autofill.AutofillManager.notifyViewEntered(AutofillManager.java:566)
at android.view.View.notifyEnterOrExitForAutoFillIfNeeded(View.java:6980)
at android.view.View.onFocusChanged(View.java:6966)
at android.widget.TextView.onFocusChanged(TextView.java:9606)
at android.view.View.handleFocusGainInternal(View.java:6631)
at android.view.View.requestFocusNoSearch(View.java:10868)
at android.view.View.requestFocus(View.java:10847)
at android.view.View.requestFocus(View.java:10814)
at android.view.View.requestFocus(View.java:10756)
at android.view.View.onTouchEvent(View.java:13018)
at android.widget.TextView.onTouchEvent(TextView.java:9665)
at com.rengwuxian.materialedittext.MaterialEditText.onTouchEvent(MaterialEditText.java:1501)
at android.view.View.dispatchTouchEvent(View.java:11776)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:448)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1829)
at android.app.Activity.dispatchTouchEvent(Activity.java:3307)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:410)
at android.view.View.dispatchPointerEvent(View.java:12015)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4795)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4609)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4166)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4293)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4174)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4350)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4200)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4166)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4174)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4147)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6661)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6635)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6596)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6764)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:186)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
布局如下:
android:id="@+id/usernameET"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/padding_xlarge"
android:layout_marginTop="@dimen/padding_large"
android:enabled="@{!loading}"
android:hint="@string/username"
android:inputType="text"
android:lines="1"
android:maxLength="50"
android:maxLines="1"
android:singleLine="true"
android:textSize="@dimen/text_normal"
app:met_accentTypeface="fonts/averta_bold.otf"
app:met_floatingLabel="highlight"
app:met_floatingLabelText="@string/username"
app:met_primaryColor="@color/text_dark"
app:met_textColor="@color/text_blue"
app:met_typeface="fonts/averta_regular.otf" />
你能否告诉我为什么会这样,以及如何解决这个问题?
先感谢您!!!