android-build-type

Android wear project with 3 flavors, 3 buildTypes and 2 applicationIdSuffixes

允我心安 提交于 2019-12-30 03:45:47
问题 When I build my project after trying to combine wearApp flavors and buildTypes with applicationIdSuffixes, i get the following error message: Error:Execution failed for task ':app:handleFirstCustomerTestMicroApk'. > The main and the micro apps do not have the same package name. From my app/build.gradle: buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release {

Gradle-only solution to modify App name based on Build Variant

核能气质少年 提交于 2019-12-23 09:50:29
问题 I am trying to modify my gradle file to allow for different names for my app based on Flavor and Build Type . So far, I have been successful in being concise with Flavor based naming using Manifest Merging techniques via the Android Gradle Plugin Docs Current These are the names of the applications on my home screen for both my debug and release builds. Flavor Debug App Name Release App Name -------- -------------- ---------------- entity_1 App Name App Name entity_2 App Name App Name ... ...

Android Studio: Is creation of a signing configuration necessary when creating a custom build type?

会有一股神秘感。 提交于 2019-12-11 10:06:50
问题 I have created custom buildTypes as follows and am not using the default debug and release buildTypes buildTypes { releasefree { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } releasepro { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' applicationIdSuffix ".pro" } debugfree { shrinkResources true applicationIdSuffix ".debug" debuggable true

Android: How to reset resConfigs for release variant?

我是研究僧i 提交于 2019-12-11 00:29:24
问题 To make development faster, I want to do the following: android { defaultConfig { resConfigs "en" } } My app has a lot of languages, and doing this saves significant time while developing. However, I do NOT want to release a version with this set. Unfortunately, resConfigs is not available on product flavors or build types, so I can't set it in debug {} , for example. How can I automatically exclude resConfigs from release variants? I do not want to have to remember comment out that line of

Copy constructor using “initWith” for “productFlavors” and “sourceSets”

核能气质少年 提交于 2019-12-10 01:48:02
问题 With reference to this answer. Is it possible to create a copy constructor for productFlavors and sourceSets using initWith just like the one in the linked answer. That one worked great for buildTypes . For buildTypes it was done this way: debugfree.initWith(buildTypes.debug) Is this possible for productFlavors and sourceSets as well? 来源: https://stackoverflow.com/questions/36199741/copy-constructor-using-initwith-for-productflavors-and-sourcesets

Gradle SourceSets by productFlavor and buildType

亡梦爱人 提交于 2019-12-07 18:58:45
问题 EDIT flavors and paths: Currently I have: sourceSets.whenObjectAdded { sourceSet -> def sourceData = rootProject.ext[sourceSet.name] sourceSet.java.srcDirs = sourceData.javaDirRelease } The rootProject.ext is a file where all the productFlavor specific configuration is defined like this: ext{ flavor1 = [ javaDirRelease : ['src/pathToJavaReleaseFiles'] javaDirDebug : ['src/pathToJavaDebugFiles'] ] } In the main build.gradle I also do: apply from: 'variants.gradle' which contains the above ext{

Gradle SourceSets by productFlavor and buildType

大城市里の小女人 提交于 2019-12-06 08:46:58
EDIT flavors and paths: Currently I have: sourceSets.whenObjectAdded { sourceSet -> def sourceData = rootProject.ext[sourceSet.name] sourceSet.java.srcDirs = sourceData.javaDirRelease } The rootProject.ext is a file where all the productFlavor specific configuration is defined like this: ext{ flavor1 = [ javaDirRelease : ['src/pathToJavaReleaseFiles'] javaDirDebug : ['src/pathToJavaDebugFiles'] ] } In the main build.gradle I also do: apply from: 'variants.gradle' which contains the above ext{} object. The sourceSets are defined as such: sourceSets { flavor1{} } This works but I want to do add

Android Gradle: Install all build types on one device

女生的网名这么多〃 提交于 2019-12-06 05:37:16
问题 How do I configure my project to be able to install the debug version alongside the release version when using GCM, ContentProvider, AccountType? (without the use of flavors) I keep getting errors such as: INSTALL_FAILED_CONFLICTING_PROVIDER or INSTALL_FAILED_DUPLICATE_PERMISSION 回答1: Installing a debug apk and the release apk on the same device is tricky if you are only using build types and not flavors (Why Build types and not flavors) Most blog post are either outdated (talking about

Android Gradle: Install all build types on one device

旧时模样 提交于 2019-12-04 12:07:20
How do I configure my project to be able to install the debug version alongside the release version when using GCM, ContentProvider, AccountType? (without the use of flavors) I keep getting errors such as: INSTALL_FAILED_CONFLICTING_PROVIDER or INSTALL_FAILED_DUPLICATE_PERMISSION Benoit Installing a debug apk and the release apk on the same device is tricky if you are only using build types and not flavors ( Why Build types and not flavors ) Most blog post are either outdated (talking about packageName) or force you to use flavors because the solution they propose does not support

Android Studio 3 + Gradle 4.0 + shrinkResources + libraryProject = Unable to find a matching configuration in project

蓝咒 提交于 2019-12-01 03:19:44
I've problems to migrate my project to the newest Gradle 4.0 + Android Studio 3 version, which gives me all kind of errors. Little by little I managed to sort them all out except this one. Could not resolve all dependencies for configuration ':app:forGoogleCoverageRuntimeClasspath'. > Unable to find a matching configuration in project :mylibrary: - Configuration 'debugApiElements': - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'AndroidTypeAttr{name=Aar}' and found compatible value 'AndroidTypeAttr{name=Aar}'. - Required com.android.build.gradle.internal.dependency