Android的磨损产生两个APK

Android的磨损产生两个APK

本文介绍了Android的磨损产生两个APK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚建立了我的第一个Android应用程序的磨损。我有两个模块,移动和磨损。我有我的手机模块的依赖指向磨损模块所描述的文档。当我生成APK我结束了两个的apk,一个叫移动,一个叫磨损。如果我只是忽略了磨损的apk还是我不会做一些正确的事情?我认为,应该只有一个APK。

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 documentation. When I generate the apk I end up with two apks, one called mobile and one called wear. Should I just ignore the wear apk or did I not do something right? I think that there should only be one apk.

推荐答案

有两种原因的APK(用于调试/测试),你可以(也应该)的Andr​​oid Wear设备上安装的磨损APK directy。

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

但是,当你要发布了Android Wear就绪应用程序来Play商店,你应该只上传了手机的apk。其他的apk嵌入内,并且将被自动推到连接的手表。

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.

请参阅安装可穿戴应用的文件中:

在开发时,用户直接安装应用的可穿戴像  手持设备的应用程序。兼用亚行安装或Android上的播放按钮  工作室。

当你准备发布应用程序给用户,您将嵌入可穿戴  应用程序的手持设备的应用程序内。当用户安装该应用程序的手持式  从谷歌播放,连耐磨自动接收  可穿戴式应用程序。

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的磨损产生两个APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 16:26