Unable to edit ConstraintLayout in layout editor

I am trying to edit ConstraintLayout in the layout manager in Android Studio 3.0. Unfortunately, I get the following error:

The following classes cannot be created: - android.support.constraint.ConstraintLayout

Java.lang.NoSuchFieldError exception information: ConstraintLayout_Layout in android.support.constraint.ConstraintLayout.init (ConstraintLayout.java:440) in android.support.constraint.ConstraintLayout. (ConstraintLayout.java:420) in java.lang.reflect.Constructor.newInstance (Constructor.java:423) in android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:730) on android.view.LayoutInflater.inflate (LayoutInflater. java: 492) at android.view.LayoutInflater.inflate (LayoutInflater.javahaps94)

I can’t drag and drop elements, they all seem to be tiny dots in the upper left corner, although the layout works fine on the emulator.

I tried to follow the advice on various issues here. I restored the project, an invalid cache, made sure that the ConstraintLayout support repositories were installed in the gradle script ( implementation 'com.android.support.constraint:constraint-layout:1.0.2' ), changing the theme in the editor, but nothing helped.

What else can I try to solve the problem?

Edit: my build.gradle file (Module: app): https://gist.github.com/meyerlasse/44f06e18d6dab50593325f25f9b62bd2

+5
source share

Source: https://habr.com/ru/post/1270081/


All Articles