Fixed
Status Update
Comments
xa...@google.com <xa...@google.com>
im...@google.com <im...@google.com>
im...@google.com <im...@google.com> #2
Thank you for the repro case, it helped a lot! I have a fix pending now - will let you know in which version it will be released.
cm...@google.com <cm...@google.com> #3
As this is a regression from 3.5, marking as blocking 3.6, 4.0 and 4.1 final
im...@google.com <im...@google.com> #4
Fix is submitted in master in Change-Id: I605f6bfd586fd036cfa354f0bf0a54899cb5a5fc, cherry picks waiting for submitting in 3.6 and 4.0.
Description
Gradle & Kotlin versions: should not matter (tested on resp. 5.6.4 & 1.3.61)
In the project attached, I've only added 2 files from the default template project created by AS 3.6 RC 1:
* src/main/res/values/attrs.xml that defines a styleable attribute whose attributes are namedspace using the prefix "android:"
* Foo.java that tries to use the attributes from the generated R class.
In AGP 3.5:
The R class that was generated was generating a constant for `R.styleable.Keyboard_android_verticalGap`.
In AGP 3.6:
The R class fields are not constants anymore for these particular attributes. (We realized it as compilation started to fail on a switch case).
After chatting about the issue with Xav@google, he asked to file a bug, it looks like the behavior is not expected.
An obvious workaround has been to refactor the switch into an if/else statement.