enableAggregatingTask conflicts with productFlavors begin with alphabet bigger than g, which cause :app:dependencies fail.
See original GitHub issueI have to run :app:depencencies for update lock file which is a kind of mechanism to manage version. But an error happens. I think it’s a bug.
To explain the bug, I create a very simple project., which just has android and hilt plugin. There is two flavors.
Execution failed for task ':app:dependencies'.
> Cannot change dependencies of dependency configuration ':app:standardDebugAndroidTestRuntimeClasspath' after it has been included in dependency resolution. Use 'defaultDependencies' instead of 'beforeResolve' to specify default dependencies for a configuration.
I find similiar issues. But the situation is different. Becuase the project is very clean. https://github.com/google/dagger/issues/2744
Furthermore, I try the new version hilt 2.40. It’s the same situation.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
enableAggregatingTask conflicts with productFlavors
Execution failed for task ':app:dependencies'. ... When I remove a flavor starting with alphabet bigger than g, it works well.
Read more >Can't shift trade with villager - PaperMC/Paper - IssueHint
enableAggregatingTask conflicts with productFlavors begin with alphabet bigger than g, which cause :app:dependencies fail. 5, 2021-11-22, 2022-10-13.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Turns out this also occurs with the AGP task
:app:checkJetifier
and the root issue is now fixed in AGP 7.2.0-beta01 based on https://issuetracker.google.com/204421586.Yes - The solution is indeed to eventually upgrade AGP.
As for the flag, maybe try turning off
enableAggregatingTask
just to run:app:dependencies
, but keep it ON for everything else. Sorry for the inconvenience.