4

In my project I have a few modules. If Build Variant tab all in debug build variant all is ok

enter image description here

But if I change one of the module to release build variant his dependency modules also change to release, but with kind of error

enter image description here

I tried this solution

https://stackoverflow.com/a/52011770/5709159

for me it doesn't work

How to fix it?

Sirop4ik
  • 4,543
  • 2
  • 54
  • 121
  • Does it work if you change the `app` project to release as well? I'm going on a wild assumption that the `app` module also depends on the libraries and conflicts when it's dependencies have the wrong variant – JensV Apr 14 '20 at 09:32
  • @JensV hmm, yes, you are right it is works... So, I does it mean that it is normal behavior? – Sirop4ik Apr 14 '20 at 09:36
  • I'd presume so... In theory, building `president_app` should still work even with the error. But if you try to build `app` it will fail because the dependencies have the wrong variant. You'd have to test it, I'm not sure if I'm right. If that's the case, it's more like a warning than an error – JensV Apr 14 '20 at 09:38
  • @JensV yes, you are right, it is works. It is really looks like a warning – Sirop4ik Apr 14 '20 at 10:38

1 Answers1

3

Hover over the red area you can see the reason:

Module 'XXX' has variant 'release' selected, but the module "XXX" depends on variant 'debug'

It's because the dependent modules are using the wrong building variant.

Qing
  • 172
  • 11