I spend ages on this. The wearApp gradle rule worked fine for me. But then for the Paid version of the app, following the guide on the blog to manually package the wear app, it wouldn't auto-load on the wearable. After lots of checking, I found that the wearApp gradle rule (on Android Studio 0.8.2), did actually place the wearable APK in the raw folder as per the blog post fix. So seems to be fixed in latest Android Studio (without being told?). And for some reason, manually packaging the APKs didn't work.
So use the wearApp gradle rule.
Also, if you need to reference a different version of the wear APK for different handheld APK versions (for free and pro versions to have applicationId that matches the wearable version), use the productFlavors in the wear gradle config:
productFlavors {
freeapp {
applicationId "com.barkside.appfree"
}
proapp {
applicationId "com.barkside.apppro"
}
}
Then in your Pro version gradle (for example), have the wearApp dependency target a particular configuration:
wearApp project(path: ':wear', configuration: 'proappRelease')
You will also need publishNonDefault true
in the android block of the wear gradle.