The key is, instead of wearApp ...  to use 
<flavorName><BuildName>WearApp... task in your gradle file.

For explanation take a look at this answer in Google's bug tracker: 
https://code.google.com/p/android/issues/detail?id=74658#c33 
Also make sure that the order of "dependencies" and "android" sections in 
your gradle file is correct (e.g. "dependencies" after "android").


On Thursday, March 5, 2015 at 2:02:26 PM UTC-5, Nathan wrote:
>
> I have a task that is probably simple for all you gradle/Android Studio 
> gurus. 
>
> This is how you package a wear app inside a mobile app for installation. 
>
> dependencies {
>    compile 'com.google.android.gms:play-services:5.0.+@aar'
>    compile 'com.android.support:support-v4:20.0.+''
>    *wearApp project(':wearable')*
> }
>
>
> Good so far. But lets say the wear app has several build variants. I don't 
> know how I would specify which build variant. Presumably, I'd want each 
> build variant of the mobile app to include the corresponding build variant. 
> As above, it doesn't appear to include any, as the apk size is too small. 
>
> As a fallback, I suppose we could do this. Since the apks of different 
> build variants have different filenames. Of course, this does not force a 
> signed build of the wear app to ensure that the apk is current. 
>
> dependencies {
>   ...
>   wearApp files('/path/to/wearable_app.apk')
> }
>
>
>
> Nathan
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to