Status Update
Comments
mc...@gmail.com <mc...@gmail.com>
mc...@gmail.com <mc...@gmail.com> #2
There are two things that are happening here:
1. The error is saying that the attributes used were not defined, and they match exactly the error in b/136103084 - which leads me to believe that perhaps between the builds the gradle version was updated and that's why the bug in constraint layout surfaced.
2. Aapt2 stores the absolute path in the compiled resources for reporting errors. This is why the <CI workspace> path is shown since that was stored in the file. In order to fix this we need to make the input resource-sets to tasks that compile resources as PathSensitivity.ABSOLUTE. A better non-temporary fix would be to make aapt2 accept storing non-absolute paths and for us to figure out the proper error reporting ourselves.
For 1 follow b/136103084 , for 2 I'll do a temporary fix of using PathSensitivity.ABSOLUTE and I'll see what we can do to avoid storing the absolute paths.
1. The error is saying that the attributes used were not defined, and they match exactly the error in
2. Aapt2 stores the absolute path in the compiled resources for reporting errors. This is why the <CI workspace> path is shown since that was stored in the file. In order to fix this we need to make the input resource-sets to tasks that compile resources as PathSensitivity.ABSOLUTE. A better non-temporary fix would be to make aapt2 accept storing non-absolute paths and for us to figure out the proper error reporting ourselves.
For 1 follow
so...@google.com <so...@google.com>
so...@google.com <so...@google.com> #3
Re 1., the build in question had just added
<!-- Workaround for stricter aapt in AGP 3.6 -->
<attr name="motionProgress" />
<attr name="motionPathRotate" />
<attr name="waveDecay" />
<attr name="flow_verticalSeparator" />
<attr name="flow_horizontalSeparator" />
to app/src/main/res/values/attrs.xml. There was, however, a second com.android.application module that hadn't added that yet. If I'm understanding you correctly, you're saying that this wasn't really trying to reference a path that didn't exist locally (but did exist on the CI workspace), but rather it just _reports_ that path in an attempt to provide a user-friendly error report?
And as far as I can tell, both builds (the one that failed and the one that pushed to the cache) were on Gradle 5.6.2.
<!-- Workaround for stricter aapt in AGP 3.6 -->
<attr name="motionProgress" />
<attr name="motionPathRotate" />
<attr name="waveDecay" />
<attr name="flow_verticalSeparator" />
<attr name="flow_horizontalSeparator" />
to app/src/main/res/values/attrs.xml. There was, however, a second com.android.application module that hadn't added that yet. If I'm understanding you correctly, you're saying that this wasn't really trying to reference a path that didn't exist locally (but did exist on the CI workspace), but rather it just _reports_ that path in an attempt to provide a user-friendly error report?
And as far as I can tell, both builds (the one that failed and the one that pushed to the cache) were on Gradle 5.6.2.
so...@google.com <so...@google.com> #4
If you have two app modules and both have (direct or in-direct) dependency on the broken constraint layout then you either need to add those attrs to a common library module that they both depend on, or to both app modules.
And yes, aapt2 wasn't trying to access that path. It consumed a compiled file that had that path saved as the source path just for error messaging, but because the original file to-be-compiled was marked as PathSensitivity.Relative (while it should be Absolute). I'm gonna work on avoiding storing these absolute paths in the compiled res files, but until then for accurate error reporting we'll need to resolve to using PathSensitivity.Absolute for the resources to be compiled.
And yes, aapt2 wasn't trying to access that path. It consumed a compiled file that had that path saved as the source path just for error messaging, but because the original file to-be-compiled was marked as PathSensitivity.Relative (while it should be Absolute). I'm gonna work on avoiding storing these absolute paths in the compiled res files, but until then for accurate error reporting we'll need to resolve to using PathSensitivity.Absolute for the resources to be compiled.
mc...@gmail.com <mc...@gmail.com> #5
I'm renaming the bug title to make it more general, as this will probably be a multi-commit fix.
so...@google.com <so...@google.com> #6
That "temporary fix of using PathSensitivity.ABSOLUTE" is 8 months old, any plan to fix it and make it Relative again?
mc...@gmail.com <mc...@gmail.com> #7
@6 Thank you for checking in, we're working on it.
so...@google.com <so...@google.com> #8
Great!
After applyinghttps://github.com/gradle/android-cache-fix-gradle-plugin (using AGP 4.0.0-rc01) 90% of the tasks not coming from the cache are CompileLibraryResourcesTask
After applying
mc...@gmail.com <mc...@gmail.com> #9
Reassigning to Luke who's working on relative path support in compiled res files.
Description
What
User experience
What type of Android issue is this?
Audio
What steps would let us observe this issue?
What did you expect to happen?
I just want to volume up or down
What actually happened?
The music is silence or on maximum volume
What was the effect of this issue on your device usage, such as lost time or work?
Slight
When
Time and frequency
How often has this happened?
Once
Where
Component
Suggested component: <not visible> (1630575)
Build and device data
- Build Number: google/panther_beta/panther:15/AP41.240726.009/12231213:user/release-keys
(Note: It is the build when sending this report. For exact build reference, please see the attached bugreport.)
Debugging information
Usługi Google Play
com.google.android.gms
Version 243234044 (24.32.34 (260400-665920202))
System App (Updated)
Android System WebView
com.google.android.webview
Version 653310333 (127.0.6533.103)
System App (Updated)
Network operator: Plus
SIM operator: Plus
Filed by Android Beta Feedback. Version (Updated): 2.44-betterbug.external_20240710_RC02 (DOGFOOD)https://developer.android.com/preview/feedback#feedback-app .
To learn more about our feedback process, please visit