Status Update
Comments
da...@google.com <da...@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
[Deleted User] <[Deleted User]> #3
The initial report (
However,
ju...@gmail.com <ju...@gmail.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?
uc...@google.com <uc...@google.com>
da...@google.com <da...@google.com> #7
Thanks for the update!
je...@google.com <je...@google.com>
pa...@gmail.com <pa...@gmail.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!
hu...@google.com <hu...@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.
[Deleted User] <[Deleted User]> #10
Is there any chance that this will be included in the next canary release?
hu...@google.com <hu...@google.com> #11
[Deleted User] <[Deleted User]> #12
hu...@google.com <hu...@google.com> #13
[Deleted User] <[Deleted User]> #14
hu...@google.com <hu...@google.com> #15
[Deleted User] <[Deleted User]> #16
hu...@google.com <hu...@google.com> #17
[Deleted User] <[Deleted User]> #18
[Deleted User] <[Deleted User]> #19
ka...@gmail.com <ka...@gmail.com> #20
ma...@cyberagent.co.jp <ma...@cyberagent.co.jp> #21
It seems that when we have other kapt tasks (dagger, et al.), then this error occurred in the unitTest and androidTest.
Test with (AS 4.0 alpha 01).
hu...@google.com <hu...@google.com> #22
ch...@gmail.com <ch...@gmail.com> #23
hu...@google.com <hu...@google.com> #24
ma...@gmail.com <ma...@gmail.com> #25
da...@google.com <da...@google.com> #26
Do you have repro steps? Just to help ensure that this is, in fact, the same issue reported here? There might be multiple paths to produce the same error, etc. etc. If you're certain it's the same issue as here, then repro steps will help us determine if we should reopen this. Otherwise, it might be best to file a new bug since this one seems to have quite a bit of history on it.
Meanwhile, there are 20 +1's on this bug. Can anyone else who was experiencing this report that it was actually fixed for them starting in 3.6.0?
Thanks! David
sa...@dfarooq.com <sa...@dfarooq.com> #27
Hey David,
I think this may have regressed. I created a fork of the original sample project with AGP 4.1.2.
The Robolectric test fails with the same error. If kotlin-kapt
plugin is removed, the test passes. But then the buildFeatures
databinding config says If you plan to use data binding in a Kotlin project, you should apply the kotlin-kapt plugin.
So possibly something to do with kapt?
da...@google.com <da...@google.com> #28
Ooof :) Hung, are you swamped? Would you be able to take a look?
da...@google.com <da...@google.com> #29
Hung: I meant to say, I reopned this bug, but if it ends up being a different cause, or just because this bug already has so much history, feel free to reclose it and create a new one.
sa...@dfarooq.com <sa...@dfarooq.com> #30
I tried 4.2.0-beta05 and 7.0.0-alpha8 in Arctic Fox Canary 08 and the behavior is the same. Remove kapt, test passes. Added it back, get the NoClassDefFound error.
hu...@google.com <hu...@google.com> #31
Thank you for the sample project! This issue was mentioned earlier at
This is caused by
Basically, when using kapt
, users will need to add:
kaptTest some-random-dependency
forkapt
to run annotation processing on unit test source code, which in this case will include the missing data binding classes.kaptAndroidTest some-random-dependency
forkapt
to run annotation processing on androidTest source code.
Please follow the Kapt bug above for progress on this issue.
@David: I'm closing this issue as this should ideally be fixed by the Kotlin Gradle plugin.
ar...@gmail.com <ar...@gmail.com> #32
I can not sing google account
Description
Sample repo:
To reproduce:
- Run `ConnectedMainActivityTest` = OK
- Run `MainActivityTest` = OK
- Run `ConnectedLibActivityTest` = OK
- Run `LibActivityTest` = Error
------
Build: $VERSION, AI-183.5429.30.34.5310756, 201902141945,
AI-183.5429.30.34.5310756, JRE 1.8.0_152-release-1248-b22x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14, screens 1680x1050, 1920x1080; Retina
Android Gradle Plugin: 3.4.0-beta05
Gradle: 5.1.1
NDK: from local.properties: (not specified); latest from SDK: (not found);
LLDB: pinned revision 3.1 not found; latest from SDK: (package not found);
CMake: from local.properties: (not specified); latest from SDK: (not found); from PATH: (not found);
IMPORTANT: Please read