Android Studio 2.2 not displaying view properties

有些话、适合烂在心里 提交于 2019-12-04 05:42:09

问题


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:

Exception in plugin Android Support Moments Ago.

Missing attribute definition for focusable java.lang.IllegalArgumentException:

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,

My OS is ubuntu 16.04 and almost i have upgraded everything in Android SDK to the latest version.


回答1:


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.




回答2:


It might be problem with OpenJDK. Please remove it and install Oracle JDK instead using this post: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

Then go to File -> Project Structure and change Java sdk path.

Hope it will help



来源:https://stackoverflow.com/questions/40050800/android-studio-2-2-not-displaying-view-properties

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!