android-studio-3.0 – Android键盘(AOSP)继续使用Android O模拟器停止

前端之家收集整理的这篇文章主要介绍了android-studio-3.0 – Android键盘(AOSP)继续使用Android O模拟器停止前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在使用 Android键盘Android O模拟器时遇到了这个问题.它总是给我错误的说法

“Android Keyboard (AOSP) has stopped”

当我试图从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方面的错误吗?

解决方法

这是AOSP 8.0中的LatinIME输入法中的一个错误(可能他们没有发现它,因为AOSP键盘没有用于品牌Android).

修复程序在这里:
https://android-review.googlesource.com/#/c/platform/packages/inputmethods/LatinIME/+/469478/

猜你在找的Android相关文章