Questions tagged [build-variant]

65 questions
97
votes
16 answers

Getting error says - "Entry name 'res/layout/test_toolbar.xml' collided" while creating signed apk

I have updated my android studio from 3.5.x to 3.6 today and getting an error while generating signed apk for build variant showing the following message - Entry name 'res/layout/test_toolbar.xml' collided I don't have any layout named like this…
A S M Sayem
  • 2,010
  • 2
  • 21
  • 28
77
votes
2 answers

ERROR: No signature of method: com.crashlytics.tools.gradle.CrashlyticsPlugin.findObfuscationTransformTask()

I am getting the following error while trying to build my project on Android Studio: ERROR: No signature of method: com.crashlytics.tools.gradle.CrashlyticsPlugin.findObfuscationTransformTask() is applicable for argument types:…
72
votes
9 answers

Error: The apk for your currently selected variant (Unknown output) is not signed. Please specify a signing configuration for this variant (debug)

After upgrading to Android Studio Arctic Fox (2020.3.1) Canary 9. I cannot run my tests. It pops up the Edit Configurations window to show Error: The app for your currently selected variant (Unknown output) is not signed. Please specify a signing…
33
votes
10 answers

variantOutput.getPackageApplication() is obsolete

with Gradle 4.10.1 and the Android Gradle plugin updated to 3.3.0, I get the following warning: WARNING: API 'variantOutput.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'. the line, with…
12
votes
4 answers

Different string.xml files according to app Build Variants

I want to assign a value to a string in string.xml different values depending on the Build Variant/buildType. I imagine something like this: res/values-debug/string.xml some debug…
Al Lelopath
  • 6,448
  • 13
  • 82
  • 139
9
votes
4 answers

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…
7
votes
2 answers

Problem switch build variant with Dynamic Feature on Android Studio 3.6

After I upgrade Android Studio to the latest release 3.6 I faced with the problem when I switch between variants during develop app (has dynamic feature). My Settings flavors for all modules (app/library/dynamic-feature): flavorDimensions…
Robust
  • 2,415
  • 2
  • 22
  • 37
7
votes
1 answer

Vector Drawable Not Overwritten by Build Variant Flavor Dimension

I have an app with a base brand and multiple whitelabel brands along with multiple server targets. In my app's build.gradle,the flavors are defined as: flavorDimensions("server", "whitelabel") In my src/main/res/drawable I have a logo.xml…
7
votes
1 answer

Run unittests just on one build variant with gradle

I have a multi dimensional android gradle Project which takes long to build and long to test. I have a two dimensional flaver definition. the first dimensions has 2 project values , the second dimension has 4 environment definitions , and there are…
Luke
  • 595
  • 1
  • 5
  • 19
7
votes
0 answers

Change Build Variant directly in Run Configuration

Considering this screen : Today, when I want to change the build variant of my app, I click on menu #1 and switch to the one I want. The thing I want to do, is creating multiple run configurations (click #2), for each of my useful variants. Studio…
6
votes
1 answer

How to create build variants in Flutter Android so that each build variants have different app id?

I need to have 3 different APKs (dev, UAT, prod), each targetting different Firebase database. But on each Firebase project, I need to supply a permanent app id. That means I need to have 3 build variants that each deploying APK with different app…
Chen Li Yong
  • 5,459
  • 8
  • 58
  • 124
6
votes
1 answer

Android Studio build variant problems

I am having difficulty getting Android Studio to build the right build variant — or even to let me select a build variant at all, sometimes. Basically I have two different versions of my project a free and a "full" version. Package ids are…
6
votes
1 answer

Use a different class for each build variant

I have an Application class that I want to be different in each build variant like debug and release. this is my map: app/ | |----debug/ |----java\ …
max
  • 5,963
  • 12
  • 49
  • 80
5
votes
2 answers

Android Studio 3.6 always select the first build variant

I've just updated to Android Studio 3.6 stable version. After that, every time I open my project. The Android Studio changes my selected build variant to the first item in the variant list. Then I have to change the selected variant and sync gradle…
Harvey
  • 1,353
  • 1
  • 14
  • 27
5
votes
1 answer

Does androidTest support flavors and build type variants?

Does androidTest support flavors and build type variants? flavorDimensions "foo" productFlavors { full { dimension "foo" } trial { dimension "foo" } } If there is only src/androidTest/java, which variant to test?
eastwater
  • 4,624
  • 9
  • 49
  • 118
1
2 3 4 5