Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to Change Build Variant

When I changed the variants in my project with android studio 3.5 in 2019, I could not change from Active Build Variants. I solved this by deleting the .idea and Build folders of the project and changing the Varieties from Active Build Variants in a new way.

**2019 :

Project build Gradle: 3.5.3

Android Studio: 3.5**

I can't change the Variants from Active Build Variants in any way in the project by keeping the same Build Gradle the same product Flavors Configuration. This is the only difference between the previous configuration and the current one

**2020 :

Project build Gradle: 3.5.3

Android Studio: 4.0.1**

Has anyone worked with Recent Build Variants? What could be the approximate cause of this kind of problem?

build varients

Product Flavour

like image 370
Azmia Hoque Radhio Avatar asked Nov 29 '22 12:11

Azmia Hoque Radhio


2 Answers

Try to untick File > Settings > Experimental > Gradle > Only sync the active variant

like image 187
gevge Avatar answered Dec 04 '22 15:12

gevge


I fixed this by resyncing the gradle. enter double shift --> then search for sync --> resync gradle with project files.

like image 20
mmdreza baqalpour Avatar answered Dec 04 '22 13:12

mmdreza baqalpour