Status Update
Comments
tn...@google.com <tn...@google.com> #2
The issue seems to be some discrepancy in what the IDE thinks the package name should be for the Flow, and what the compiled code says (see screenshot). Interestingly I only see this in 4.2, not 7.0, so perhaps these constants were updated recently.
tn...@google.com <tn...@google.com> #3
Diego, can you take a look at this?
I'm seeing something weird; when I create a lint unit test, the SdkConstants.CLASS_CONSTRAINT_LAYOUT_FLOW has the correct value for newName, so the test passes, but when I attach with a debugger to AGP 4.2, I get what you see in the screenshot -- the wrong value. Do you have any ideas what could cause the AndroidX name lookup to produce different values in these scenarios??
tn...@google.com <tn...@google.com> #4
Haha, I meant to assign to Diego but forgot to actually do that.
In the meantime, for 4.2, I think I'll just check for both paths (pre AndroidX and post AndroidX).
di...@google.com <di...@google.com> #5
Ack. I'll have a look.
tn...@google.com <tn...@google.com> #6
(I have a 4.2-safe workaround in ag/13699079 if the root cause here is trickier to fix (especially given that this isn't happening in A/7.0, though it's possible that the same cause is there but hidden by something else.)
di...@google.com <di...@google.com> #7
I did a bit of debugging and I think I know the problem.
com.android.tools.build.gradle:4.2.0-beta05
depends on com.android.tools.build.gradle:bundletool:1.1.0
and the later is shipping a very outdated version of migration.xml
.
di...@google.com <di...@google.com> #8
7.0.0-alpha04
has that dependency upgraded to bundletool:1.4.0
which would explain why it works there.
di...@google.com <di...@google.com> #9
Re-assigning to Chris just to double check that everything makes sense and the fact that we were are shipping 4.2.0 with quite an old version of bundletool
.
cm...@google.com <cm...@google.com> #10
Any duplicated classes should be renamed in bundle-tool, so there's something strange going on here
cm...@google.com <cm...@google.com> #11
Ah I see that the migrateToAndroidx java resource isn't renamed...
cm...@google.com <cm...@google.com> #12
Diego, can we (as a workaround for now) rename that java resource to avoid the conflict, and then I'll reach out to the bundle-tool team to rename that java resource
cm...@google.com <cm...@google.com> #13
Proposed fix is I7eacac3a70e30f6cf530fe68e6616dfebbb535e3
di...@google.com <di...@google.com> #14
LGTM. Thanks Chris!
tn...@google.com <tn...@google.com> #15
This is fixed right? (Chris' fix went into one of the last 4.2 betas.)
Description
With 4.2, given this layout (just replace activity_main in a default Empty project):
and you run gradle :app:lintDebug on this layout, you'll get this incorrect error: