8

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

The following classes could not be instantiated: - android.support.constraint.ConstraintLayout

Exception Details java.lang.NoSuchFieldError: ConstraintLayout_Layout   at android.support.constraint.ConstraintLayout.init(ConstraintLayout.java:440)   at android.support.constraint.ConstraintLayout.(ConstraintLayout.java:420)   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)   at android.view.LayoutInflater.inflate(LayoutInflater.java:492)   at android.view.LayoutInflater.inflate(LayoutInflater.java:394)

I can't actually drag around items, they all seem to be tiny dots in the upper left corner, although the layout works fine on the emulator.

I tried to follow advice from different questions on here. I rebuilt the project, invalidated cache, made sure that the ConstraintLayout support repositories are installed and in the gradle script (implementation 'com.android.support.constraint:constraint-layout:1.0.2'), changing the theme in editor, but nothing helped.

What else could I try to fix the problem?

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

3
  • 1
    Double check that you have the correct dependencies in your Gradle file.
    – Booger
    Jul 21, 2017 at 18:47
  • 1
    It's very possibly a bug in the recent versions of AS 3.0. It was working fine in AS 3.0 Canary 3 I think, then it went downhill. Jul 21, 2017 at 18:56
  • I'm seeing this exact issue in Android Studio 2.3.3.. Sep 14, 2017 at 6:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.