ConstraintLayout Build Errors

In the beginning of this chapter I’m told to convert my LinearLayout to a ConstraintLayout by using the ‘Component Tree’ of the graphical layout tool.

After following the instructions I received this error:

"A problem occurred configuring project ‘:app’.
> Could not resolve all dependencies for configuration ‘:app:_debugApkCopy’.
> Could not find com.android.support.constraint:constraint-layout:1.0.0.
Required by: CriminalIntent:app:unspecified "

I don’t understand why gradle can’t find my dependency because I definitely added it. Can anyone help?

It looks like you need to update some of your sdk tools. When I first use constraint layout 1.0, I get a prompt like you see in the image to download the update:

Clicking “Install artifact and sync project” should fix the issue.

Once I restarted Android studio it gave me a similar error to the one that your picture showed and so I synced the project. It worked thanks :slight_smile: