Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
333 views

How to retrieve the secrets from AWS Secrets manager and use in buildconfig.properties in android?

I have added some secret keys of my app in AWS Secrets Manager. Now I need to retrieve them in buildConfig properties of android (Kotlin), through which the values of the secret keys will be generated ...
Siva's user avatar
  • 11
0 votes
1 answer
217 views

Is there any chance to keep global variable in global gradle which value can be updated in App modules and utilised in lib modules

I have created multi module project in android studio. which is having 3 app modules and 5 library modules. I want a constant variable DB_VERSION_CODE in one of library module. and that value should ...
shobhan's user avatar
  • 1,498
0 votes
1 answer
687 views

Can't set targetSdkVersion = 29

I am developing an Android application which use a native library and native library supports targetSDKVersion = 29 only. I created a new Android project has default targetSDKVersion =31, I tried to ...
Zappy.Mans's user avatar
149 votes
8 answers
120k views

Fixing the "Build Type contains custom BuildConfig fields, but the feature is disabled" error w/ buildConfigField

In the new version of Android Studio (Flamingo | 2022.2.1 Canary 9) with the org.jetbrains.kotlin (1.8.0-Beta) plugin and 8.0.0-alpha09 gradle plugin, a new build suddenly gets this error: Build Type ...
fattire's user avatar
  • 8,723
0 votes
0 answers
226 views

Flutter cannot find build tools

Flutter cannot find any build tools for any version given to it. I've been through this for 3 weeks and search anywhere still not find any solution. Here is the error message Here is my zshrc Here ...
Lucy's user avatar
  • 11
0 votes
0 answers
689 views

Android cannot find symbol BuildConfig

I have two modules, A and B. A added B as dependency. BuildConfig is generated in B, while being used in both A and B. No error shows in Android Studio, and the app can be installed successfully. But ...
android's user avatar
2 votes
1 answer
4k views

buildConfigField not working after updating gradle to 7.0.3

I updated gradle 4.0.1 to 7.0.3 because I need the support of new gradle. I let the auto updater run and after it was done, when I run the code I get the following error: C:\Users\me\Projects\proj\...
Richard's user avatar
  • 1,117
7 votes
2 answers
5k views

Reach the version code and name from a library module

I'm currently working on modularizing my application, so I'm putting each feature in a library module. In one of my features, I access the version code and name. However, although I defined them in ...
Walid Baroudi's user avatar
0 votes
1 answer
3k views

How to set applicationid for different flavor and buildtype?

I have 2 flavors flavor1 flavor2 and 5 buildtypes dev debug uat preprod release I would like to set full applicationId to be com.example.flavor1dev com.example.flavor1debug com.example.flavor1uat ...
freeman's user avatar
  • 94
2 votes
0 answers
182 views

system error! on binary upload on Samung Seller Portal

I am trying to upload an APK file on Samsung Seller Portal as an update to already existing app. I built the app using "Generate Signed Bundle/APK" option on Android Studio. I am getting &...
Shubham's user avatar
  • 3,153
0 votes
1 answer
510 views

How disable dynatrace for debug builds android

I want to disable dynatrace to collect debug builds In my build.gradle (android): dynatrace { configurations { debug { enabled false } release { ...
Pavlo Kravchenko's user avatar
0 votes
1 answer
161 views

Android: Are there any methods to share a resource betwwen different falvors and sourceset?

I have an application with below source sets and flavors: flavorDimensions "brand" productFlavors { flavor1 { dimension "brand" sourceSets { main { ...
VSB's user avatar
  • 10.3k
0 votes
1 answer
321 views

D8: Program type already present: androidx.renderscript.Allocation$1

I have a react-native application, using RN 0.62.2, that is working properly. When trying to use hermes instead of JSC, I am getting the following error during build: D8: Program type already present: ...
Yossi's user avatar
  • 5,997
1 vote
0 answers
868 views

Replacement for BUILD_BROKEN_PHONY and phony-rebuild in android R

I am trying to build Android R but getting the following error in the kernel makefile: > kernel/exynos/AndroidKernel.mk:155: error: writing to readonly > directory: > "/data/home/...
user2910111's user avatar
1 vote
1 answer
2k views

How to build APK file from Flutter project?

Here I want build apk file for my flutter project. But a problem occurred when I build APK file with flutter build apk command. I already define flutter SDK path, android SDK path, JDK path in ...
J M Bhikadiya's user avatar
2 votes
1 answer
795 views

How to set buildConfigField for module from outside for android?

I am developing in Android, and I have a submodule in my project. I have set buildConfigField like the following in build.gradle of Module buildTypes { release { minifyEnabled false ...
Wun's user avatar
  • 6,381
1 vote
0 answers
198 views

Automate android multi flavour app build generation

I want to automate build generation[apk/aab] of my application which having multiple flavours assume I have at least 10 flavours. Since taking debug build or release build is time-consuming process I ...
Muhamed Riyas M's user avatar
1 vote
0 answers
1k views

Android generated BuildConfig is in submodule package, not in app module

I created some submodules for project, which has been imported from git. And I'm getting error when I import BuildConfig for app like, com.app.BuildConfig. Only I can import is BuildConfig of one of ...
JoonSoo Park's user avatar
0 votes
2 answers
492 views

How to manage configuration based on build type and build flavor

In my app I have 2 build types release and debug, below is the code snippet. buildTypes { getByName("debug") { applicationIdSuffix = ".debug" versionNameSuffix = ".debug" ...
DisplayName's user avatar
13 votes
4 answers
14k views

Android Studio 3.5.2 - Error: The apk for your currently selected variant (app-release-unsigned.apk) is not signed

A little background. I have been building/debugging/testing my simple App for a few months with no problems. Build/install on AVD or my actual S9 phone. All worked just fine for months. Now, ready for ...
JJJones_3860's user avatar
  • 1,532
0 votes
1 answer
183 views

How to add a custom Module-Description Variable in Android.mk?

I want to access a module description variable (a custom variable) while building an android module i.e. an executable or shared-library or prebuilt and based on its value do some extra processing on ...
d3xter's user avatar
  • 61
0 votes
1 answer
1k views

Change string value in config file based on build type - Android

I have a config file (config.xml) in res/values location. Inside this file, I need to add a string resource, where its value should change based on build type (debug/release). It's not possible to ...
Suneesh Ambatt's user avatar
0 votes
1 answer
183 views

How to have the BuildConfig.DEBUG value of the final app from a lib/sdk

Is the value of BuildConfig.DEBUG general or related to my lib? More info: I'm developing a lib/sdk, this sdk is built and deployed in a repository. The final app includes this deployed sdk. ...
Giovesoft's user avatar
  • 620
2 votes
0 answers
352 views

Task :transformClassesAndResourcesWithR8ForRelease FAILED Program type already present *.BuildConfig

I have an Android Studio (3.4.1) cocos2d-x project with multiple modules. My settings.gradle file defines the 3 modules: include ':libcocos2dx' project(':libcocos2dx').projectDir = new File(...
shawn_t's user avatar
  • 21
1 vote
3 answers
4k views

Don't generate BuildConfig - Gradle Kotlin DSL

To disable generating BuildConfig with the Groovy DSL, one could do the following: afterEvaluate { generateReleaseBuildConfig.enabled = false generateDebugBuildConfig.enabled = false } I am ...
Programmer001's user avatar
2 votes
2 answers
902 views

BuildConfigField to decide how to define the member (enum)

build.gradle(Module): productFlavors { mytest { ... buildConfigField "boolean", "SHORT_ENUM", "false" } mysecondtest { buildConfigField "boolean", "SHORT_ENUM", "...
Alon Shmiel's user avatar
  • 7,111
1 vote
0 answers
1k views

Android BuildConfig String with Json

I'd like to have a JSON formatted String in the buildConfig but the build process messes the string up and I'm not sure how to fix it. This is the JSON: { "testkey1": "someValue1", "testkey2"...
Emanuel's user avatar
  • 895
5 votes
2 answers
4k views

Error: Program type already present: androidx.core.R

I am having this issue when I try to do a release build. Build.gradle file apply plugin: 'com.android.application' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android' apply ...
Isaac Sekamatte's user avatar
8 votes
2 answers
4k views

Where can I find my BuildConfig in the APK analyzer after minifying the code with ProGuard?

Please take a look at the following two images from Analyze APK on Android Studio. First one is with minifyEnabled = false, and another one is with minifyEnabled = true (after decoding with mapping....
barley's user avatar
  • 4,463
0 votes
2 answers
1k views

Gradle - Android - buildConfigField base on a pair of (productFlavors, buildTypes)

I have a field YOUR_POWER which is set to a value based on the BuildType. My config in build.gradle: productFlavors{ free { buildConfigField "int", "YOUR_POWER", 80 } paid { ...
Anh-Tuan Mai's user avatar
  • 1,189
0 votes
2 answers
3k views

How do I update the BASE_URL defined in my gradle through UI?

I am currently working on creating an alertdialog box with edittext in it which opens on tap on my login screen , which should allow the capability to update the BASE_URL defined in my gradle. Say for ...
user avatar
-2 votes
1 answer
145 views

Generating signed APK fails on one build config

I am working on a project and had to generate a signed APK. It works perfect for one flavor and the debug of the other. It says Password verification failed on the release config of the config I am ...
8kk's user avatar
  • 140
0 votes
0 answers
511 views

How to import java file of flavours in main folder?

I am creating an android project with different product flavours. My project structure is like this Flavor1 Flavor2 Main where Flavor1 contains a Constants.java file, Flavor2 also contains a ...
User's user avatar
  • 722
1 vote
1 answer
1k views

Android Gradle: call buildConfigield inside gradle task or method

I'm trying to add BuildConfig variable using gradle. I see that buildConfigField is valid when I call it on gradle buildTypes: release/debug and also on defaultConfig but I'm trying to create this ...
Elior's user avatar
  • 3,266
2 votes
1 answer
2k views

How to get proguard errors at android studio

I enable proguard for release and got the following error: Execution failed for task ':app:transformClassesAndResourcesWithProguardForFlavorQuaRelease'. [ERROR] [org.gradle.internal.buildevents....
MiguelSlv's user avatar
  • 15.1k
0 votes
0 answers
110 views

Tablayout with viewpager and FragmentPagerAdapter crashes on vertical scroll after build tools and sdk update

I have a legacy application which had following build configurations targetSdkVersion 23 compileSdkVersion 23 buildToolsVersion 23.0.2 SupportLibVersion 23.4.0 gradle 2.2.0 and I updated them to ...
Learner_Programmer's user avatar
2 votes
1 answer
372 views

While updating compileSdkVersion & targetSdkVersion to 26 - duplicate value for resource 'attr/fontFamily' with config

I'm updating my apps compile & target SDK version from 23 to 26 (Android 8.0). But after update, getting following error: error: duplicate value for resource 'attr/fontFamily' with config '. ...
Akhtar Khan's user avatar
6 votes
3 answers
35k views

Change BuildConfig file in Android Studio using Gradle

I am trying to add URL into my BuildConfig file using Gradle in Android Studio. So I added this code into the gradle file buildTypes { debug { buildConfigField "String", "...
Asset Bekbossynov's user avatar
2 votes
2 answers
3k views

Build Error: Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug

I have a gradle build error in my android application. I tried to update NDK and all modules, but it still appears. Does anybody know what can cause it and how to fix it? Below is my gradle file: ...
yozhik's user avatar
  • 5,054
2 votes
2 answers
529 views

Flutter: Android build for deployment

How can I create/prepare Android build for deployment on Appstore, using Android Studio? (I've developer account singed app and keys/credential) What are step and checklist, required to create ...
Krunal's user avatar
  • 79.5k
2 votes
1 answer
2k views

Put property from parameters into a android build config with a default value using gradle?

I would like to grab a parameter from gradle command line -Pfruit=Apple And then put this parameter into a BuildConfig for every buildType. I'm trying to achieve using: buildConfigField("String", "...
pixel's user avatar
  • 26.3k
0 votes
1 answer
2k views

Gradle build error (manifestOutputFile) when upgrading plugin to 3.0.0

After upgrading the Gradle plugin version to 3.0.0 (classpath "com.android.tools.build:gradle:3.0.0") and if I then try to clean or build the project I get this error: A problem occurred configuring ...
uncle_tex's user avatar
  • 518
1 vote
1 answer
1k views

how can I fix UnsupportedOperationException: Can't convert value at index 12 to dimension: type=0x3

so We recently updated our buildToolsVersion to 26.0.2 And now our code crashes in the CircularProgressButton library that we are using when trying to create a CircularProgressButton (see library I ...
Dan Anderson's user avatar
  • 1,124
2 votes
1 answer
1k views

productFlavors application Id

I'm trying to make two types of builds in Android Studio usung productFlavors. I need to have unique applicationId for each buld type. And here is an issue: First of all I add this code to my gradle ...
Anton Prokopov's user avatar
14 votes
2 answers
4k views

How to check debuggable or debug build type in android library?

I have an Android AAR library. One security policy I want to impose on the consumer application of my library, is that it must not be able to use my library when debuggable is true or the apk is ...
Farhad's user avatar
  • 12.9k
0 votes
1 answer
4k views

Access buildConfigField from gradle in Android app

I am building a multi-app project in Android Studio and use Gradle for my versioning. I use versionName "1.0" versionCode 2 versionNameSuffix = ".alpha1" I also use def getDate() { new Date()...
jo phul's user avatar
  • 647
2 votes
2 answers
558 views

How to determine selected `configuration` in Android?

In Android Studio I created two configurations: How can I determine in code which configuration I selected? I know that there is buildConfigField in /app/build.gradle but the names of the buildTypes ...
Manuel's user avatar
  • 15k
2 votes
1 answer
3k views

illegal escape character on BuildConfig.java, Android Studio

I Clone a project using Android studio 2.2.2 on windows, when I run the project there is an error illegal escape character on the BuildConfing.java file The original development might be used ...
Silhan52's user avatar
0 votes
1 answer
96 views

I am getting following error while build my signed apk in my app

I am getting following error in my console, please help me, is there any problem in publishing to app store.(i apologize for my English & this is my first app using android studio) MoreInfo ...
Test_Me's user avatar
  • 29
8 votes
3 answers
2k views

Combined BuildConfig variables in gradle flavor dimensions

In my Android application I have two flavor dimensions: "brand" (brand1, brand2) and "environment" (staging, production). I added the "environment" dimension after a while and I had previously defined ...
Carlo Moretti's user avatar