Status Update
Comments
sg...@google.com <sg...@google.com> #2
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Expected output
What is the expected output?
Current output
What is the current output?
ju...@duolingo.com <ju...@duolingo.com> #3
Please read the description.
Expected output:
What is the expected output?
See attached "expected.webm" video in OP
Current output
What is the current output?
See attached "actual.webm" video in OP
ma...@google.com <ma...@google.com> #4
2. Install and run on Android 5 (Lollipop) or above
3. Click FAB and see it fall below/behind the navigation bar once the Snackbar disappear
ma...@google.com <ma...@google.com> #5
br...@duolingo.com <br...@duolingo.com> #6
However you have problems extracting such, here's the same content as a ZIP archive.
ma...@google.com <ma...@google.com> #7
br...@duolingo.com <br...@duolingo.com> #8
Please check this issue and provide your inputs.
ma...@google.com <ma...@google.com> #9
br...@duolingo.com <br...@duolingo.com> #10
This seems to work around the issue successfully:
snackbar.addCallback(object : Snackbar.Callback() {
override fun onDismissed(transientBottomBar: Snackbar?, event: Int) {
transientBottomBar?.removeCallback(this)
Handler(Looper.getMainLooper()).post {
coordinatorLayout?.requestApplyInsets()
}
}
})
ma...@google.com <ma...@google.com> #11
There is a utility called profgen
(
I was thinking you could attach a task to run after before the bundling to regenerate the profile on the final shape of the dex files. This is a bit of a hacky solution but it should work. You can find the tasks that are called to assemble the bundle with --dry-run
and create a new task on which bundling should depend on, that simply calls the utility.
I should be able to make that change to the utility.
br...@duolingo.com <br...@duolingo.com> #12
ma...@google.com <ma...@google.com> #13
br...@duolingo.com <br...@duolingo.com> #14
ju...@duolingo.com <ju...@duolingo.com> #15
My current understanding is that we would use profgen to generate baseline.prof/profm based on the modified dex files (after you make the change to the profgen CLI to allow dex files as inputs). Where would we place the modified prof/profm files after regenerating them?
You could also use the utility directly as a dependency of the gradle task so you wouldn't need that.
Also, could you clarify what you mean by this?
ma...@google.com <ma...@google.com> #16
The baseline prof/profm are just placed in the assets, if I remember correctly in assets/dexopt/baseline.prof(m)
but you can confirm this by decompressing an apk.
If you do create that task you'd have to make sure the file is placed in the correct build output dir before the assets are processed to be packaged into the apk (also this you can confirm building an apk and checking in which intermediates
folder the assets are placed).
I'm thinking now though that there might be some other issue with bundletool
when creating an aab
- I need to check with the another team.
You could also use the utility directly as a dependency of the gradle task so you wouldn't need that.
I mean that the repo I linked, you could just clone it and build the artifact of profgen. Then use that as a dependency in your main app classpath so that the task you create will see the profgen api.
ju...@duolingo.com <ju...@duolingo.com> #17
Thank you!
The confusion I was running into was specifically with creating an aab
(the baseline profile is valid when we just try to generate an apk). When inspecting the aab
in Android Studio, it appears that baseline.prof(m)
is under BUNDLE-METADATA/com/android/tools/build/profiles
, instead of base/assets/dexopt
- so placing the files in the assets doesn't work. Instead I've been trying to place them within the following (which are all initially generated during :app:compileReleaseArtProfile
):
intermediates/binary_art_profile/release/compileReleaseArtProfile/baseline.prof
intermediates/binary_art_profile_metadata/release/compileReleaseArtProfile/baseline.profm
intermediates/dex_metadata_directory/release/compileReleaseArtProfile
(which requires.dm
files that I'm creating by zipping togetherprimary.prof(m)
)
So far this has been unsuccessful, so I'll keep investigating, but please let me know if there's something that stands out as incorrect with my process!
ju...@duolingo.com <ju...@duolingo.com> #18
Also, the repo that you linked doesn't seem to have the ability to output the profile metadata (which is something I believe we would need). Is there some way around this?
ma...@google.com <ma...@google.com> #19
The repo I linked is what's used internally so it should output also profile metadata -> in any case I believe AGP uses profile in P
format for baseline profile, that doesn't require metadata.
Lemme get back to you about bundletool
. We've an internal issue
Description
We have been trying to integrate baseline profiles into our app, but using
desugarjdklibs
appears to invalidate them. Our hypothesis is that the desugaring library does not correctly handle multiple dex files. When using profgen'sdumpProfile
tool on our AAB, we recieve the "Profile header not compatible with the Dex header
" error message.We were able to reproduce this by modifying Android's Baseline Profile Codelab . This PR explains how to reproduce the error. We were only able to reproduce the issue once we turned on startup profiles, which results in multiple dex files. In our own application, disabling startup profiles did not fix the error - presumably because our application has multiple dex files regardless of whether startup profiles are enabled. We are able to fix the error by removing
desugarjdklibs
.