Obsolete
Status Update
Comments
jo...@google.com <jo...@google.com> #2
Same issue.
Try this:
Roll back to AS-C3.
Set gradle back to '...:3.6.0-alpha03'. (The issue is caused by this, I think.)
Clean project.
I'm sure an update will fix it.
Try this:
Roll back to AS-C3.
Set gradle back to '...:3.6.0-alpha03'. (The issue is caused by this, I think.)
Clean project.
I'm sure an update will fix it.
jm...@google.com <jm...@google.com> #4
Successfully downgraded projects to use AS3.6C3
RG
RG
jm...@google.com <jm...@google.com> #5
Same issue here, downgrading to AS3.6C3 works OK
al...@google.com <al...@google.com> #6
New project does not produce this kind of error, will try to drill down to what dependency will break it.
gp...@gmail.com <gp...@gmail.com> #7
Have drilled down and found that the error occures on
dependencies {
...
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
...
}
tested with following alphas and betas
"alpha3": OK
"alpha4": Fail
"alpha5": Fail
"beta1": Fail
"beta2": Fail
This was a simple test, have not tested thoroughly with a more complex test yet.
-> Solution : Downgrade 'androidx.constraintlayout:constraintlayout:2.0.0-xxx' to 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
RG
dependencies {
...
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
...
}
tested with following alphas and betas
"alpha3": OK
"alpha4": Fail
"alpha5": Fail
"beta1": Fail
"beta2": Fail
This was a simple test, have not tested thoroughly with a more complex test yet.
-> Solution : Downgrade 'androidx.constraintlayout:constraintlayout:2.0.0-xxx' to 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
RG
al...@google.com <al...@google.com> #8
Great catch! rolling back to 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3' enables to keep using 3.6.0-alpha04 android gradle plugin
gp...@gmail.com <gp...@gmail.com> #9
Thank you for your feedback. Team may reach out for more feedback in reproducing or triaging this issue.
ap...@google.com <ap...@google.com> #10
Unfortunately, alpha3 is also failing for me, see also https://issuetracker.google.com/issues/121395935
Alpha2 is working for me.
Alpha2 is working for me.
al...@google.com <al...@google.com> #11
ap...@google.com <ap...@google.com> #12
FWIW I can confirm reverting to alpha3 fixes the issue for me. Going all the way back to a2 wasn't necessary.
ap...@google.com <ap...@google.com> #13
I think this is related to the change in AAPT2 where it became stricter about defining attr resources in styleables. Before you could define a new attribute under a declare styleable without giving its format, and now you have to explicitly define it as its own resource (if I understood correctly). Ryan, can you confirm? Is there perhaps a way to relax this if there are a lot of libraries that are already depending on this 'lazy' way of defining attrs? (I will check with the constraint layout folks separately to fix it on their side)
ap...@google.com <ap...@google.com> #14
This change in aapt2 was made because aapt(1) also required that one either explicitly defines the attribute separately (with or without a format) or one specifies the format on the attribute within the declare-styleable.
aapt2 did not require this at first and allowed for declare-styleable attributes defined without a format to create new attribute resources.
There is not a way to relax this currently with aapt2 but depending on how Gradle invokes aapt2, it may be possible to work around this issue by defining each missing attribute resource within the application resource directory.
<attr name="flow_horizontalSeparator" />
<attr name="flow_verticalSeparator" />
...
aapt2 did not require this at first and allowed for declare-styleable attributes defined without a format to create new attribute resources.
There is not a way to relax this currently with aapt2 but depending on how Gradle invokes aapt2, it may be possible to work around this issue by defining each missing attribute resource within the application resource directory.
<attr name="flow_horizontalSeparator" />
<attr name="flow_verticalSeparator" />
...
ap...@google.com <ap...@google.com> #15
I don't really understand this comment
> but depending on how Gradle invokes aapt2
AGP defines how Gradle invokes the aapt2 tool.
> but depending on how Gradle invokes aapt2
AGP defines how Gradle invokes the aapt2 tool.
ap...@google.com <ap...@google.com> #16
@15 What Ryan is suggesting is that if we notice that there are attributes without definitions we can automatically add them during resource merging. While it would solve our problem short term, this wouldn't work long term as it wouldn't work in the namespaced world. The proper solution would be to fix the libraries (constraintlayout and possibly other libraries out there), but it might be difficult to track them all down.
As a temporary workaround you can add the missing attributes yourself to your values file, for example:
"error: resource attr/flow_verticalSeparator not found" -> add "<attr name="flow_verticalSeparator"/>" into src/main/res/values/attrs.xml
As a temporary workaround you can add the missing attributes yourself to your values file, for example:
"error: resource attr/flow_verticalSeparator not found" -> add "<attr name="flow_verticalSeparator"/>" into src/main/res/values/attrs.xml
ap...@google.com <ap...@google.com> #17
Confirmed this is an issue with constraint layout 2.2.0-alpha4. Either downgrade to an older version of the library or add these to your app's src/main/res/values/attrs.xml:
<resources>
<attr name="motionProgress"/>
<attr name="motionTarget"/>
<attr name="layout_marginBottom"/>
<attr name="motionPathRotate"/>
<attr name="duration"/>
</resources>
<resources>
<attr name="motionProgress"/>
<attr name="motionTarget"/>
<attr name="layout_marginBottom"/>
<attr name="motionPathRotate"/>
<attr name="duration"/>
</resources>
ch...@google.com <ch...@google.com> #18
John, could you take a look? I tried to look at the current sources on cs/ but I couldn't find this. These attributes appear in constraint layout 2.0.0-alpha4 (and alpha5) in AAR's res/values/values.xml.
[Deleted User] <[Deleted User]> #19
To get the build working in the current 'androidx.constraintlayout:constraintlayout:2.0.0-beta2', I also had to add to #17:
<attr name="flow_verticalSeparator"/>
<attr name="flow_horizontalSeparator"/>
<attr name="waveDecay"/>
to attrs.xml -- (just want to be sure that waveDecay is also included.)
<attr name="flow_verticalSeparator"/>
<attr name="flow_horizontalSeparator"/>
<attr name="waveDecay"/>
to attrs.xml -- (just want to be sure that waveDecay is also included.)
ja...@socialpoint.es <ja...@socialpoint.es> #20
Are there any side-effects defining those attrs manually until the
underlying cause is corrected?
RG
tir. 9. jul. 2019, 20:49 skrev <buganizer-system@google.com>:
underlying cause is corrected?
RG
tir. 9. jul. 2019, 20:49 skrev <buganizer-system@google.com>:
ar...@google.com <ar...@google.com>
gp...@gmail.com <gp...@gmail.com> #21
@20 This should work with no side effects until full resource namespaces are supported.
Currently everything is merged in the app's namespace (that's why you can just use the app's R class for everything). Defining these attrs at your app's level instead of the constraint layout library makes no difference to the output. In the AAR they are defined without format, so you don't need to worry about specifying it in values/attrs.xml either. Once the issue is fixed in constraint layout though, you should remove these attrs from your app as they will be overriding the library ones (which would be a problem if constraint layout defined them with format).
For now it's safe to add them to your app's values/attrs.xml, but once the issue is fixed in constraint layout please remove them.
Currently everything is merged in the app's namespace (that's why you can just use the app's R class for everything). Defining these attrs at your app's level instead of the constraint layout library makes no difference to the output. In the AAR they are defined without format, so you don't need to worry about specifying it in values/attrs.xml either. Once the issue is fixed in constraint layout though, you should remove these attrs from your app as they will be overriding the library ones (which would be a problem if constraint layout defined them with format).
For now it's safe to add them to your app's values/attrs.xml, but once the issue is fixed in constraint layout please remove them.
Description
Here's a project setup for running ASAN:
NB: This seems to effect AS 3.2 Canary 16. I have a memory of lldb attaching and working in AS 3.1.2 but don't remember the exact version that it last worked in and thus can't easily label it a regression.