gpt4 book ai didi

Android Wear生成两个apk

转载 作者:可可西里 更新时间:2023-11-01 19:06:01 25 4
gpt4 key购买 nike

我刚刚创建了我的第一个 Android Wear 应用程序。我有两个模块,mobile 和 wear。我在我的移动模块上有一个指向 wear 模块的依赖项,如文档中所述。当我生成 apk 时,我最终得到了两个 apk,一个叫做 mobile,一个叫做 wear。我应该忽略 wear apk 还是我做错了什么?我认为应该只有一个 apk。

最佳答案

有两个 apk,因为(用于调试/测试)您可以(并且应该)在 Android Wear 设备上直接安装 wear apk。

但是,当您打算将“Android Wear-ready”应用发布到 Play 商店时,您应该只上传移动 apk。另一个 apk 嵌入其中,并将自动推送到连接的 watch 。

参见 Install the Wearable app在文档中:

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.

关于Android Wear生成两个apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24599852/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com