Reputation: 13
Hy I am trying to package the wearable app using Android studio 1.0.1 and I am following the steps given on this link https://developer.android.com/training/wearables/apps/packaging.html and I followed the steps over 3 successfully . but when go for 4th step , that is to click the Build menu on AS and to click the signed apk , but after that I got a selection box , weather to sign the mobile apk or to sign the wear app.
Now this is a point which is confusing for me , Should I go for Mobile app and It is all done and I would be able then to install the app on mobile and it will push the wear app to wearable or should I first signed the wear app and then paste this signed app in the mobile app and then select the sign mobile app , ??? what should I do to make it work
I think that my question is quite clear now. waiting for help
Upvotes: 0
Views: 1157
Reputation: 1491
You should build and sign your just mobile application. Wearable aplication will be signed automatically and introduced inside mobile .apk
You could check this opening the .Apk generated as a .zip. Wear apk will be in res/raw/ folder.
Upvotes: 0
Reputation: 22173
You have to simply create a module of your wear app with the same applicationId. In addition you add to your gradle script file of your mobile app:
dependencies {
//something bla bla
wearApp project(':mywearable')
}
Generete from Android Studio menu your release APK for your mobile app. You'll see actually that two apk are generated, the mobile and the wear apk but it's only a convenience for you. If you check the mobile apk you'll see the wear app inside, so don't worry use always to publish the mobile apk.
Upvotes: 2