I have an app where I would like to add an app extension for Android Wear. The main application has three build types (debug, beta, and release). Beta builds have applicationIdSuffix , which allows me to install the play-store version and the current development version in parallel on one device. All this worked fine until I added a wearing app.
The main build.gradle application is as follows:
apply plugin: 'com.android.application' android { ... defaultConfig { ... applicationId "com.example.mainApp" ... } buildTypes { debug { applicationIdSuffix '.debug' } beta { applicationIdSuffix '.beta' } release { } } } dependencies { ... wearApp project(':wear') }
Wear-App has the same build types as the same applicationIdSuffix values. However, when I create a beta application (by calling gradle assembleBeta ), the build process builds :wear:assembleRelease instead of :wear:assembleBeta , so I get the following error message during assembly:
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:handleBetaMicroApk'. > The main and the micro apps do not have the same package name.
How can I say that the build process creates the correct build type when packaging the main application with the build type beta ?
android android-wear android-gradle gradle
Tom Aug 05 '14 at 14:16 2014-08-05 14:16
source share