android-build-flavors

Manifest Merger Error when using Dynamic Features and Build Flavors

自作多情 提交于 2021-02-09 10:13:58
问题 With dynamic-feature-modules it is possible to define in the AndroidManifest.xml wheter a module should come preinstalled: <dist:module ... dist:onDemand="false" dist:title="@string/title_shop"> .... </dist:module> or not: <dist:module ... dist:onDemand="true" dist:title="@string/title_shop"> .... </dist:module> I have two build flavors in my project. The module should be preinstalled in one flavor but not in the other. The idea is to have this default AndroidManifest.xml in the main source

React-Native productFlavors (Error type 3: Activity class does not exist)

亡梦爱人 提交于 2020-08-22 09:55:08
问题 I want to use 2 productFlavors for my Android App: live and staging . In app/build.grandle I defined them like this: defaultConfig { applicationId "com.some.id" minSdkVersion 16 targetSdkVersion 22 versionCode 1 versionName "1.0" ndk { abiFilters "armeabi-v7a", "x86" } } splits {...} buildTypes { release { minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } debug { debuggable true minifyEnabled false proguardFiles

Android Studio build variant problems

回眸只為那壹抹淺笑 提交于 2020-02-02 11:11:50
问题 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 "com.mycompany.myproj" and "com.mycompany.myprojfree". Once I've specified "myproj" and "myprojfree" flavors and "release" and "debug" buildtypes, Android Studio produces four variants in the list: myprojDebug, myprojfreeDebug, myprojfreeRelease, and

Single flavor module based on multi flavor library in Gradle

≯℡__Kan透↙ 提交于 2019-12-19 13:50:29
问题 I'm working on a multi-flavor app . (gradle files below) It uses a library called tracker that follow the same flavors internal and external Now for the tricky part, come a new module called feature , this one has no flavor but it needs the tracker as dependency app.gradle: android { buildTypes { debug { } release { } } flavorDimensions "target" productFlavors { internal { dimension "target" } external { dimension "target" } } } tracker.gradle: android { publishNonDefault true buildTypes {

Android: Application for different requirements and features

ぐ巨炮叔叔 提交于 2019-12-12 04:37:14
问题 Using build variant in Android we can support different flavors. I need to develop an application where I am supporting different clients. Each client needs are a little different. However, the basic data, network call class etc are same for all clients. How can I ensure partial code of my application remains same for all flavors? This will help in maintaining one repository for all common classes. 回答1: You need to understand how build variant works. Each client needs are a little different

How to hide or add menu items for Flavor?

做~自己de王妃 提交于 2019-12-10 18:19:40
问题 I have an app that has 3 different flavors, full , part1 and part2 . All different flavors have different package names, so I can ship them as different apps. Now I want that only part1 gets a menu item called Reload . The other 2 flavors shouldn't have this menu item. Is this possible? I tried the following with the menu resources: app | +-src | +-full | +-main | | | +-res | | | +-menu | | | +-main_activity.xml | +-part1 | | | +-res | | | +-menu | | | +-main_activity.xml | +-part2 Where main

Single flavor module based on multi flavor library in Gradle

被刻印的时光 ゝ 提交于 2019-12-01 15:37:25
I'm working on a multi-flavor app . (gradle files below) It uses a library called tracker that follow the same flavors internal and external Now for the tricky part, come a new module called feature , this one has no flavor but it needs the tracker as dependency app.gradle: android { buildTypes { debug { } release { } } flavorDimensions "target" productFlavors { internal { dimension "target" } external { dimension "target" } } } tracker.gradle: android { publishNonDefault true buildTypes { release { } debug { } } flavorDimensions 'target' productFlavors { internal { dimension "target" }

Android separate string values for release and debug builds

不羁的心 提交于 2019-11-29 16:52:29
问题 Every time i release my app i change all my url strings and some keys from testing to production. The way I do it is just comment out the testing strings before i release. Is there a better way to handle strings based on the build type ? 回答1: Assuming you use Android Studio, by default the system creates a basic release and debug flavor. So if you add a debug and release folder in the app/src folder of your project you can declare separate values there. So your structure should be like this: