java.lang.UnsupportedOperationException:不支持的服务:无障碍机器人工作室 [英] java.lang.UnsupportedOperationException: Unsupported Service: accessibility android studio

查看:2164
本文介绍了java.lang.UnsupportedOperationException:不支持的服务:无障碍机器人工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我也遇到了这个UnsupportedOperationException异常的问题。我最近切换到Android工作室,所以这是很新的我。我想给recyclerview添加到我的项目,做的东西吧,但布局设计师抛出我这个错误:

I have ran into a problem with this UnsupportedOperationException. I have recently switched to android studio, so it is quite new for me. I wanted to add the recyclerview into my project, and do stuff with it, but the layout designer throws me this error:

java.lang.UnsupportedOperationException: Unsupported Service: accessibility
at com.android.layoutlib.bridge.android.BridgeContext.getSystemService(BridgeContext.java:465)
at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:290)
at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:266)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:379)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:99)
at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:172)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:132)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:806)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:401)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:329)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:333)
at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:674)
at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:663)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:663)
at com.android.tools.idea.rendering.RenderService.render(RenderService.java:790)
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:480)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)

应该是什么的问题,老实说,我不知道。我看过教程实施RecyclerView到项目,但是这是Android的工作室给我回我用谷歌官方code后。

What should be the problem, I don't honestly know. I've watched tutorials for implementing RecyclerView into the project, but this is what Android Studio gives me back after I use the official Google code.

编辑:看来它解析为我接受的答案是正确的,但我没有尝试过我自己

It seems it is resolved as the answer I accepted is correct, but I did not tried it on my own.

编辑:由于我接受了目前的答案,这是我的问题有点相关,但它不是一个完整的解决方案。如果任何人都可以或可以提供一些修订或变通方法这一点,我就只要更新接受的答案作为其提供这样的信息,如果该问题是由的IntelliJ或解决谁是开发商。也谢谢你戴夫指出它失败了,至少我们可以写一票开发者:)

As I accepted the current answer, it is somewhat relevant to my issue, but it's not a full solution. If anyone can or could provide some fix or workaround to this, I'll update the accepted answer as long as its providing such an information, or if the issue was solved by IntelliJ or whoever is the developer. Also thank you Dave for pointing out where it fails, at least we can write a ticket to devs :)

推荐答案

这个问题终于被固定在API级别22 SDK管理器和RecyclerView支持库。引用在相关的Andr​​oid此评论问题(这是在2015年3月11日关闭),你需要:

This issue was finally fixed in the API Level 22 SDK Manager and RecyclerView support library. To quote this comment in the relevant Android issue (which was closed on March 11, 2015), you need to:

...更新通过SDK管理器的最新SDK平台API 22,
  并通过更新支持升级到最新的回收视图
  通过SDK Manager存储库,并在你的build.gradle文件中使用
  最新的版本(22.0.0)

... update to the latest SDK platform for API 22 via the SDK Manager, and update to the latest recycler view by updating the Support repository via the SDK Manager, and in your build.gradle file to use the latest version (22.0.0)

此外,在设计工具的顶部,您需要选择API Android版本22.如果你选择一个早期版本,你会继续看到错误,即使你拥有最新的支持库。

In addition, at the top of the designer tool, you need to select API Android version 22. If you pick an earlier version, you will continue to see the error, even though you have the latest support library.

这篇关于java.lang.UnsupportedOperationException:不支持的服务:无障碍机器人工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆