0

I have a problem with the preview of my app.

enter image description here

In the log file i have a few errors :

enter image description here

This is a group project but I am the only one encountering this problem. I just downloaded Android Studio so I did not touch anything in the settings.

Any idea?

Vadim Kotov
  • 7,103
  • 8
  • 44
  • 57
Kipo
  • 1
  • I think you should find what you need in [this post](https://stackoverflow.com/questions/37992187/gradle-sync-failed-could-not-find-constraint-layout1-0-0-alpha2) – toto1911 Apr 29 '19 at 09:14
  • @kipo just add `implementation 'androidx.constraintlayout:constraintlayout:1.1.3'` to app's build.gradle dependancy section – Basi Apr 29 '19 at 09:39
  • Thank you for your answer, I tried your solution but it didn't hekp. Do you have any other idea ? – Kipo Apr 29 '19 at 10:12

2 Answers2

0

Add constraint layout dependency in build.gradle

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
f.khantsis
  • 2,599
  • 2
  • 37
  • 53
  • Thank you for your answer but sadly it doesn't change anything. I added the line in the build.graddle file then synced my project then restarted it but it didn't work – Kipo Apr 29 '19 at 10:11
0

Just click the blue text that prompt in your console

enter image description here

or try to add these into your gradle (app level)

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'

And you can update them to latest version if Android Studio tells you there's a new version.

Wesely
  • 1,248
  • 12
  • 21
  • Nothing happens when I click on the blue text you indicated. I also tried to add the two lines in the build.gradle file but nothing changed. But I have a message in the event log section telling me to migrate my project to Gradle, maybe this is what it's all about ? – Kipo Apr 29 '19 at 10:09
  • I think you should. It tells you that your AndroidStudio didn't know what is `Constraint-Layout`, so you need to add that to gradle and sync/rebuild to let it know how to render the `constraintLayout` If it's possible, I'll recommend you use the latest suggested version of gradle / AndroidStudio / appcompat/support libs. (remember to backup first, it might get quite annoying in the beginning) – Wesely Apr 30 '19 at 01:22