Android Wear generate two apk

后端 未结 2 1132
闹比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.

    0 讨论(0)
  • 2020-12-18 22:34

    Two APKs is exactly what is expected: the wear APK is then embedded into the mobile APK as per the packaging Wear apps training. In release builds, the wear APK is then auto-installed onto the user's Android Wear device. However, as per the note on the packaging page:

    This feature doesn't work when you are signing your apps with a debug key when developing. While developing, installing apps with adb install or Android Studio directly to the wearable is required.

    0 讨论(0)
提交回复
热议问题