ConstraintLayout在蓝图模式之外不能正确渲染

我今天开始使用Android Studio 2.2和ConstraintLayout,但是我在渲染时遇到了一些问题。 当使用蓝图模式时,一切都显得很好。 使用devise模式时,物体粘在左上angular,全部粘在一起。

Android Studio警告:onMeasure错误

java.lang.NoSuchMethodError: android.support.constraint.solver.widgets.ConstraintWidget.immediateConnect(Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;Landroid/support/constraint/solver/widgets/ConstraintWidget;Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;II)V at android.support.constraint.ConstraintLayout.setChildrenConstraints(ConstraintLayout.java:517) at android.support.constraint.ConstraintLayout.updateHierarchy(ConstraintLayout.java:433) at android.support.constraint.ConstraintLayout.onMeasure_Original(ConstraintLayout.java:728) at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java) at android.view.View.measure(View.java:19731) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.view.View.measure(View.java:19731) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:19731) at com.android.layoutlib.bridge.impl.RenderSessionImpl.measureView(RenderSessionImpl.java:545) at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:342) at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429) at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966) at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533) at com.android.tools.idea.rendering.RenderTask.lambda$inflate$72(RenderTask.java:659) 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) 

依赖关系:

 compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8' 

这是Android Studio中的一个无法解决的错误还是有东西是可以解决的? SDK已更新。

编辑

XML文件:

 <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:src="@drawable/about" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageView6" android:layout_marginStart="16dp" android:layout_marginTop="16dp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" android:layout_marginLeft="16dp" /> <TextView android:text="TextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView33" android:layout_marginStart="16dp" android:layout_marginTop="16dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintLeft_toRightOf="@+id/imageView6" android:layout_marginLeft="16dp" /> <TextView android:text="TextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView34" app:layout_constraintRight_toRightOf="@+id/textView33" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/textView33" /> </android.support.constraint.ConstraintLayout> 

Solutions Collecting From Web of "ConstraintLayout在蓝图模式之外不能正确渲染"

如此处所述约束布局Alpha8发行说明

注意:由于API更改,升级到Alpha 8后,可能需要重新启动Android Studio 2.2才能运行布局预览。

所以从菜单栏中selectfile并selectinvalidate caches / restart