Questions tagged [android-buildconfig]

58 questions
0
votes
2 answers

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" buildConfigField("boolean", "DEBUG_MODE", "true") …
0
votes
1 answer

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 the executable or shared-lib or prebuilt. Is…
d3xter
  • 51
  • 5
0
votes
1 answer

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 create multiple files like…
0
votes
1 answer

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. Question: Is it possible to read the BuildConfig.DEBUG…
0
votes
2 answers

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 { buildConfigField "int", "YOUR_POWER", 100 …
0
votes
2 answers

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 instance I am currently defining my base_url as…
0
votes
0 answers

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 Constants.java file but it is not in main. My main…
0
votes
0 answers

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 gradle version 3.1.4 targetSdkVersion…
0
votes
1 answer

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 project ':app'. > Manifest Tasks does not support…
0
votes
1 answer

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().format('yyyyMMddHHmmss') } and buildConfigField…
jo phul
  • 639
  • 1
  • 9
  • 29
0
votes
1 answer

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 Information:Gradle tasks…
0
votes
1 answer

TeamCity: Compilation error:​ :​app:​compileDevDebugJavaWithJavac

/usr/local/TeamCity/buildAgent/work/app/XXX.java:339: error: cannot find symbol if (!original.url().toString().startsWith(BuildConfig.API_OAUTH) && AccessToken.getInstance() != null) { …
-2
votes
1 answer

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 trying to build. What can this be? Latest Android…
1 2 3
4