7
我在Android O模擬器中使用Android鍵盤時遇到了這個問題。它總是給我的錯誤說Android鍵盤(AOSP)一直停留在Android O模擬器上
「Android鍵盤(AOSP)已停止」
當我試圖從Android鍵盤按「?123」按鈕,然後在鍵盤關閉自己。
只有當我在Android Studio 3.0 Canary 7中使用API 26(Android O)的模擬器時纔會出現此問題。 將錯誤消息粘貼到以下內容中。
08-15 16:19:41.249 12833-12833/com.android.inputmethod.latin E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.inputmethod.latin, PID: 12833
com.android.inputmethod.keyboard.KeyboardLayoutSet$KeyboardLayoutSetException: java.lang.IllegalArgumentException: Empty keySpec at Binary XML file line #39
at com.android.inputmethod.keyboard.KeyboardLayoutSet.getKeyboard(KeyboardLayoutSet.java:207)
at com.android.inputmethod.keyboard.KeyboardSwitcher.setKeyboard(KeyboardSwitcher.java:153)
at com.android.inputmethod.keyboard.KeyboardSwitcher.setSymbolsKeyboard(KeyboardSwitcher.java:258)
at com.android.inputmethod.keyboard.internal.KeyboardState.setSymbolsKeyboard(KeyboardState.java:318)
at com.android.inputmethod.keyboard.internal.KeyboardState.toggleAlphabetAndSymbols(KeyboardState.java:262)
at com.android.inputmethod.keyboard.internal.KeyboardState.onPressSymbol(KeyboardState.java:411)
at com.android.inputmethod.keyboard.internal.KeyboardState.onPressKey(KeyboardState.java:370)
at com.android.inputmethod.keyboard.KeyboardSwitcher.onPressKey(KeyboardSwitcher.java:194)
at com.android.inputmethod.latin.LatinIME.onPressKey(LatinIME.java:1666)
at com.android.inputmethod.keyboard.PointerTracker.callListenerOnPressAndCheckKeyboardLayoutChange(PointerTracker.java:265)
at com.android.inputmethod.keyboard.PointerTracker.onDownEventInternal(PointerTracker.java:687)
at com.android.inputmethod.keyboard.PointerTracker.onDownEvent(PointerTracker.java:644)
at com.android.inputmethod.keyboard.PointerTracker.processMotionEvent(PointerTracker.java:604)
at com.android.inputmethod.keyboard.MainKeyboardView.processMotionEvent(MainKeyboardView.java:723)
at com.android.inputmethod.keyboard.MainKeyboardView.onTouchEvent(MainKeyboardView.java:710)
at android.view.View.dispatchTouchEvent(View.java:11721)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:445)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1828)
at android.app.Dialog.dispatchTouchEvent(Dialog.java:815)
at android.inputmethodservice.SoftInputWindow.dispatchTouchEvent(SoftInputWindow.java:93)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:407)
at android.view.View.dispatchPointerEvent(View.java:11960)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4776)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4590)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4128)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4181)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4147)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4274)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4155)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4331)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4128)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4181)
08-15 16:19:41.249 12833-12833/com.android.inputmethod.latin E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4147)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4155)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4128)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6642)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6616)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6577)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6745)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
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:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.IllegalArgumentException: Empty keySpec at Binary XML file line #39
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.load(KeyboardBuilder.java:175)
at com.android.inputmethod.keyboard.KeyboardLayoutSet.getKeyboard(KeyboardLayoutSet.java:227)
at com.android.inputmethod.keyboard.KeyboardLayoutSet.getKeyboard(KeyboardLayoutSet.java:204)
... 60 more
Caused by: com.android.inputmethod.latin.utils.XmlParseUtils$ParseException: Empty keySpec at Binary XML file line #39
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseKey(KeyboardBuilder.java:482)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseRowContent(KeyboardBuilder.java:362)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseDefault(KeyboardBuilder.java:798)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseSwitchInternal(KeyboardBuilder.java:609)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseSwitchRowContent(KeyboardBuilder.java:595)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseRowContent(KeyboardBuilder.java:368)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseMerge(KeyboardBuilder.java:578)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseIncludeInternal(KeyboardBuilder.java:557)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseIncludeRowContent(KeyboardBuilder.java:518)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseRowContent(KeyboardBuilder.java:366)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseKeyboardContent(KeyboardBuilder.java:310)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseMerge(KeyboardBuilder.java:576)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseIncludeInternal(KeyboardBuilder.java:557)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseIncludeKeyboardContent(KeyboardBuilder.java:513)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseKeyboardContent(KeyboardBuilder.java:315)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.parseKeyboard(KeyboardBuilder.java:229)
at com.android.inputmethod.keyboard.internal.KeyboardBuilder.load(KeyboardBuilder.java:172)
... 62 more
這是Android O端的錯誤嗎?
感謝您的信息。但我怎樣才能解決這個問題我的模擬器? – laixiaoyuan
@laixiaoyuan,可能通過安裝第三方鍵盤通過APK sideload – iBog