codelab-constraint-layout icon indicating copy to clipboard operation
codelab-constraint-layout copied to clipboard

The Infer Constraints functionality is not working

Open prag2018 opened this issue 6 years ago • 8 comments

I am using Android Studio 3.1.2 for Windows.

When reproducing step 9 of the codelab I faced the following. After pressing Infer Constraints button the constraints are visually drawn in designer but nothing is written into xml file. After closing the page all constraints are gone. This happens in this particular activity_main_inference.xml file. If I try the same functionality in some newly created layout it works.

prag2018 avatar May 04 '18 14:05 prag2018

I have encountered the same problem, have you solved it?

mohuaqing avatar May 16 '18 08:05 mohuaqing

same problem

TaxistSamael avatar Aug 01 '18 09:08 TaxistSamael

I got same problem

SatyaNarayana777 avatar Jan 31 '19 07:01 SatyaNarayana777

Hi. I had a similar issue, but I found that on the App/res/values/styles.xml file, you should add "Base" to the line containing

So it should be

ILiterallyCannot avatar Feb 15 '19 09:02 ILiterallyCannot

Same problem here. Anyone got the solution? Thanks.

carpiodanielj avatar Apr 22 '19 02:04 carpiodanielj

This is terrible. Googles own code doesn't work. Then, how can we as devs be expected to handle this? I do still prefer Relative and LinearLayouts after all this time.

BismeetSingh avatar Jun 07 '19 05:06 BismeetSingh

I have the same problem. Adding 'Base' before the Theme doesn't work for me.

YogeshUmeshVaity avatar Jul 16 '19 07:07 YogeshUmeshVaity

I thought I got the same issue. But what I noticed was: when you select everything, using "ctrl + click", you can see all of the elements in a layout with constraints.

mararosa avatar May 14 '20 20:05 mararosa