question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

enableAggregatingTask conflicts with productFlavors begin with alphabet bigger than g, which cause :app:dependencies fail.

See original GitHub issue

I 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.

demo2.zip

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
danysantiagocommented, Nov 24, 2021

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.

0reactions
danysantiagocommented, Nov 30, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found