Android Wear generate two apk

后端 未结 2 1148
闹比i
闹比i 2020-12-18 21:41

I just created my first android wear app. I have two modules, mobile and wear. I have on my mobile module a dependency that points to the wear module as described on the doc

2条回答
  •  情书的邮戳
    2020-12-18 22:30

    There are two apks because (for debugging/testing) you can (and should) install the wear apk directy on the Android Wear device.

    However, when you are going to publish the "Android Wear-ready" app to the Play Store, you should only upload the mobile apk. The other apk is embedded within, and will be automatically pushed to the connected watch.

    See Install the Wearable app in the documentation:

    When developing, you install apps directly to the wearable like with handheld apps. Use either adb install or the Play button on Android Studio.

    When you're ready to publish your app to users, you embed the wearable app inside of the handheld app. When users install the handheld app from Google Play, a connected wearable automatically receives the wearable app.

    Note: The automatic installation of wearable apps does not work when you are signing apps with a debug key and only works with release keys. See Packaging Wearable Apps for complete information on how to properly package wearable apps.

提交回复
热议问题