android - Wear App and with custom build type with applicationIdSuffix -


i have app i'd add android wear app extension. main app has 3 build types (debug, beta , release). beta builds have applicationidsuffix allows me install play-store version , current development version in parallel on same device. worked fine until added wear app.

the main app`s build.gradle looks this:

apply plugin: 'com.android.application'  android {     ...     defaultconfig {         ...         applicationid "com.example.mainapp"         ...     }     buildtypes {         debug {             applicationidsuffix '.debug'                         }         beta {             applicationidsuffix '.beta'         }         release {         }     } }  dependencies {     ...     wearapp project(':wear') } 

the wear-app has same build types same applicationidsuffix values. however, when build beta app (by calling gradle assemblebeta) build process builds :wear:assemblerelease instead of :wear:assemblebeta why following error message during build:

failure: build failed exception.  * went wrong: execution failed task ':app:handlebetamicroapk'. > main , micro apps not have same package name. 

how can tell build process build correct build type when packaging main app build type beta?

following link posted scott barta (http://tools.android.com/tech-docs/new-build-system/user-guide#toc-library-publication) came :

in build.gradle of wear app, add publishnondefault true (to publish variants):

android {     publishnondefault true } 

in build.gradle of main app,
replace

wearapp project(':wear') 

by

debugwearapp project(path:':wear', configuration: 'debug') releasewearapp project(path:':wear', configuration: 'release') 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -