Android Studio 2.2 不显示视图属性 [英] Android Studio 2.2 not displaying view properties
问题描述
将我的 android studio 升级到 2.2 版后,当我在布局设计器中单击视图以查看其属性时出现以下错误:
After upgrading my android studio to version 2.2 i'm getting following error when i click on a view in layout designer to see it properties:
插件 Android 支持时刻前的异常.
Exception in plugin Android Support Moments Ago.
缺少可聚焦的属性定义java.lang.IllegalArgumentException:
Missing attribute definition for focusable java.lang.IllegalArgumentException:
缺少可聚焦的属性定义在 com.android.tools.idea.uibuilder.property.NlPropertyItem.(NlPropertyItem.java:88)在 com.android.tools.idea.uibuilder.property.NlPropertyItem.create(NlPropertyItem.java:72)在 com.android.tools.idea.uibuilder.property.NlProperties.getPropertiesWithReadLock(NlProperties.java:111)在 com.android.tools.idea.uibuilder.property.NlProperties.lambda$getProperties$537(NlProperties.java:64)在 com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)在 com.android.tools.idea.uibuilder.property.NlProperties.getProperties(NlProperties.java:63)在 com.android.tools.idea.uibuilder.property.NlPropertiesManager.lambda$setSelectedComponents$228(NlPropertiesManager.java:174)在 com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)在 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)在 java.util.concurrent.FutureTask.run(FutureTask.java:266)在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)在 java.lang.Thread.run(Thread.java:745)
Missing attribute definition for focusable at com.android.tools.idea.uibuilder.property.NlPropertyItem.(NlPropertyItem.java:88) at com.android.tools.idea.uibuilder.property.NlPropertyItem.create(NlPropertyItem.java:72) at com.android.tools.idea.uibuilder.property.NlProperties.getPropertiesWithReadLock(NlProperties.java:111) at com.android.tools.idea.uibuilder.property.NlProperties.lambda$getProperties$537(NlProperties.java:64) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966) at com.android.tools.idea.uibuilder.property.NlProperties.getProperties(NlProperties.java:63) at com.android.tools.idea.uibuilder.property.NlPropertiesManager.lambda$setSelectedComponents$228(NlPropertiesManager.java:174) at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
和属性面板在加载时卡住,
and Properties panel stuck on loading,
我的操作系统是 ubuntu 16.04,几乎我已经将 Android SDK 中的所有内容都升级到了最新版本.
My OS is ubuntu 16.04 and almost i have upgraded everything in Android SDK to the latest version.
推荐答案
最后我通过将 compileSdkVersion 和 targetSdkVersion 从 24 更改为 23 解决了这个问题.实际上这不是解决异常的正确方法,但我不能此刻找到任何解决方案.
Finally i solved the issue by changing the compileSdkVersion and targetSdkVersion from 24 to 23. Actually it is not a proper way to resolve the exception, but i couldn't find any solution at this moment.
这篇关于Android Studio 2.2 不显示视图属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!