Android Cookie

Android 安卓是最开放的手机操作系统,谷歌安卓APP开发和安卓市场的相关话题

Android Studio:使用CoordinatorLayout呈现问题

当我将CoordinatorLayout设置为我的根元素时,Android Studio正在呈现预览时出现以下错误。 java.lang.NoClassDefFoundError: Could not initialize class android.support.design.widget.CoordinatorLayout 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:413) at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105) at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:177) at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:214) at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:142) at android.view.LayoutInflater.inflate(LayoutInflater.java:482) at android.view.LayoutInflater.inflate(LayoutInflater.java:385) at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:413) at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:321) at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:497) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:485) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:894) at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:485) at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:590) at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:644) at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:79) at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:586) at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152) […]