Status Update
Comments
ka...@google.com <ka...@google.com>
ch...@google.com <ch...@google.com> #2
We're seeing a similar error in our code. Appears to be a combination of AGP 8.6.0 and Kotlin 2 needed to hit it.
private fun Intent.stripUnwantedFlags() {
// Explicitly remove the new task and clear task flags (Our browser activity is a single
// task activity and we never want to start a second task here).
flags = flags and Intent.FLAG_ACTIVITY_NEW_TASK.inv()
flags = flags and Intent.FLAG_ACTIVITY_CLEAR_TASK.inv()
// IntentReceiverActivity is started with the "excludeFromRecents" flag (set in manifest). We
// do not want to propagate this flag from the intent receiver activity to the browser.
flags = flags and Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS.inv()
}
All 3 lines then hit:
Must be one or more of: Intent.FLAG_GRANT_READ_URI_PERMISSION, Intent.FLAG_GRANT_WRITE_URI_PERMISSION, Intent.FLAG_FROM_BACKGROUND, Intent.FLAG_DEBUG_LOG_RESOLUTION, Intent.FLAG_EXCLUDE_STOPPED_PACKAGES, Intent.FLAG_INCLUDE_STOPPED_PACKAGES, Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, Intent.FLAG_GRANT_PREFIX_URI_PERMISSION, Intent.FLAG_ACTIVITY_MATCH_EXTERNAL, Intent.FLAG_ACTIVITY_NO_HISTORY, Intent.FLAG_ACTIVITY_SINGLE_TOP, Intent.FLAG_ACTIVITY_NEW_TASK, Intent.FLAG_ACTIVITY_MULTIPLE_TASK, Intent.FLAG_ACTIVITY_CLEAR_TOP, Intent.FLAG_ACTIVITY_FORWARD_RESULT, Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP, Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS, Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT, Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED, Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, Intent.FLAG_ACTIVITY_NEW_DOCUMENT, Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, Intent.FLAG_ACTIVITY_NO_USER_ACTION, Intent.FLAG_ACTIVITY_REORDER_TO_FRONT, Intent.FLAG_ACTIVITY_NO_ANIMATION, Intent.FLAG_ACTIVITY_CLEAR_TASK, Intent.FLAG_ACTIVITY_TASK_ON_HOME, Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS, Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT, Intent.FLAG_ACTIVITY_REQUIRE_NON_BROWSER, Intent.FLAG_ACTIVITY_REQUIRE_DEFAULT, Intent.FLAG_RECEIVER_REGISTERED_ONLY, Intent.FLAG_RECEIVER_REPLACE_PENDING, Intent.FLAG_RECEIVER_FOREGROUND, Intent.FLAG_RECEIVER_NO_ABORT, Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS
ch...@google.com <ch...@google.com> #3
The initial report (
However,
eb...@netflix.com <eb...@netflix.com> #4
Thanks for fixing! What release should we be able to verify the fix in? And is there any chance of a backport for 8.6.1?
ch...@google.com <ch...@google.com> #7
Thanks for the update!
eb...@netflix.com <eb...@netflix.com> #8
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Canary 2
- Android Gradle Plugin 8.8.0-alpha02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
ch...@google.com <ch...@google.com> #9
The fixes for this issue are now also available in:
- Android Studio Ladybug | 2024.2.1 RC 1
- Android Gradle Plugin 8.7.0-rc01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
ch...@google.com <ch...@google.com> #10
Thanks again for reporting this and sharing a repro. This should be fixed in R8 8.8.27. I also tested your build against R8 8.9.21, which already has a fix for this bug.
ap...@google.com <ap...@google.com> #11
Project: r8
Branch: 8.8
Author: Christoffer Adamsen <
Link:
Version 8.8.27
Expand for full commit details
Version 8.8.27
Bug: b/389508413
Change-Id: If1355c62fdb1ac6712aa17c750d968bc041e15f7
Files:
- M
src/main/java/com/android/tools/r8/Version.java
Hash: 41d8b0614fdf5409ab38843931aad31fb2b459fc
Date: Tue Jan 14 10:50:10 2025
ap...@google.com <ap...@google.com> #12
Project: r8
Branch: 8.8
Author: Christoffer Adamsen <
Link:
Account for unconstrained live intervals in allocateSingleInterval
Expand for full commit details
Account for unconstrained live intervals in allocateSingleInterval
Bug: b/389508413
Change-Id: If8929733b90c03083cb8ef3475429dfcb1922b0c
Files:
- M
src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java
Hash: 024aca2927f8ca76a5f1cfeaf749c065e5e2cbcd
Date: Tue Jan 14 10:37:12 2025
eb...@netflix.com <eb...@netflix.com> #13
Thanks, I need to replace AGP 8.8 R8 by 8.8.27 and assume it'll ship in AGP 8.8.1?
ch...@google.com <ch...@google.com> #14
Yes, I expect this will land in AGP 8.8.1. After updating to this version of AGP you should make sure to remove the pinning of the R8 version, so that you don't accidentally downgrade R8.
hu...@google.com <hu...@google.com> #15
Adding a trivial detail:
After updating to this version of AGP you should make sure to remove the pinning of the R8 version, so that you don't accidentally downgrade R8.
AGP will probably warn in this case:
an...@google.com <an...@google.com> #16
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Patch 1
- Android Gradle Plugin 8.8.1
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
DESCRIBE THE ISSUE IN DETAIL:
STEPS TO REPRODUCE:
assembleRelease
on our appERROR: R8: java.lang.NullPointerException: Cannot read field "b" because the return value of "com.android.tools.r8.internal.BS.a(com.android.tools.r8.internal.cR)" is null
Our R8 rules are (we're using a third party obfuscation tool):
Our project is complex, it would be a challenge to create a repro project. Here the full stack-trace: