Status Update
Comments
ze...@google.com <ze...@google.com>
ze...@google.com <ze...@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
ap...@google.com <ap...@google.com> #3
The initial report (
However,
ap...@google.com <ap...@google.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?
ap...@google.com <ap...@google.com> #7
Thanks for the update!
ap...@google.com <ap...@google.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!
ap...@google.com <ap...@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.
ap...@google.com <ap...@google.com> #10
Branch: 3.3
commit 31098d7c62256f1613b209e5bd6b6d54ff28e60d
Author: Ian Zerny <zerny@google.com>
Date: Tue Sep 06 08:28:34 2022
Regression test for issue with desugaring and main-dex rules.
Bug:
Change-Id: I4d30e5b54f38d66465a93abeb87a123e9ce2fe47
A src/test/java/com/android/tools/r8/desugar/staticinterfacemethod/RegressionB244970402.java
ap...@google.com <ap...@google.com> #11
Branch: 4.0
commit 98f97fe3a84b90b53f1c1b918d567768f4349e14
Author: Ian Zerny <zerny@google.com>
Date: Tue Sep 06 09:45:28 2022
Don't desugar interface methods when building main-dex root set.
Bug:
Change-Id: I9a4557137a57a9a347d40611d153a4546ccb9004
M src/test/java/com/android/tools/r8/desugar/staticinterfacemethod/RegressionB244970402.java
M src/main/java/com/android/tools/r8/shaking/RootSetUtils.java
ap...@google.com <ap...@google.com> #12
Branch: 4.0
commit 265c7674c7ca8342ae05175fe122db6ec764ad82
Author: Ian Zerny <zerny@google.com>
Date: Tue Sep 06 09:45:16 2022
Regression test for issue with desugaring and main-dex rules.
Bug:
Change-Id: I4d30e5b54f38d66465a93abeb87a123e9ce2fe47
A src/test/java/com/android/tools/r8/desugar/staticinterfacemethod/RegressionB244970402.java
ze...@google.com <ze...@google.com> #13
A fix for this is now on our 3.3 (AGP 7.3) and 4.0 (AG{ 7.4) branches. You can use the new R8 by updating your settings.gradle or settings.gradle.kts with the following where <R8VERSION>
is replaced by 3.3.76
or 4.0.25
.
Thanks again for reporting the issue and let us know if works for you.
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:<R8VERSION>")
}
}
}
do...@gmail.com <do...@gmail.com> #14
thx! I have tried the main branch and this issue has been fixed.
Description
build env:
It's ok in agp7.2.2, but failed in higher agp versions.
reproduce step
agp7.3.0-beta04
agp7.4.0-alpha07
agp7.2.2 with r8 main branch commit a772a4c8a518d46b9cbf8fbba43a8e88eb16e15d