Android Studio 2.2不显示视图属性

问题描述:

将我的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 Support Moments Ago中的异常.

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.