【发布时间】:2015-10-27 05:33:08
【问题描述】:
我正在制作一个我计划很快发布的表盘,但是当移动端安装时我无法安装可穿戴组件(有点重要:p)。这是我在运行 Android Marshmallow 的 Nexus 5X 上安装带有嵌入式可穿戴 apk 的签名 apk 时正在测试的手表的堆栈跟踪的一部分:
10-13 20:43:50.293 2279-8109/? I/PkgMgrInstallUtil﹕ Sending install intent to PackageInstaller Intent { act=android.intent.action.INSTALL_PACKAGE dat=content://com.google.android.clockwork.home.provider/host/com.twintitanium.watchfaces.cardswatchface/wearable/com.twintitanium.watchfaces.cardswatchface/apk typ=vnd.android.cursor.item/wearable_apk cmp=com.android.packageinstaller/.wear.WearPackageInstallerService (has extras) } forcom.twintitanium.watchfaces.cardswatchface
10-13 20:43:51.168 7981-8110/? W/WearPkgInstallerService﹕ Wearable com.twintitanium.watchfaces.cardswatchface has a permission "android.permission.WRITE_EXTERNAL_STORAGE" that is not granted in the host application.
10-13 20:43:51.168 7981-8110/? W/WearPkgInstallerService﹕ Wearable com.twintitanium.watchfaces.cardswatchface has a permission "android.permission.READ_EXTERNAL_STORAGE" that is not granted in the host application.
10-13 20:43:51.168 7981-8110/? W/WearPkgInstallerService﹕ Wearable com.twintitanium.watchfaces.cardswatchface has a permission "android.permission.GET_ACCOUNTS" that is not granted in the host application.
确实,如果我在设置下转到手机上已安装的应用程序(卡片表盘),我会看到 2 个权限,即联系人和存储,被禁用。
似乎不言自明,除了我的可穿戴清单中没有任何这些权限 - 我只有“com.google.android.permission.PROVIDE_BACKGROUND”和“android.permission.WAKE_LOCK”,因为它们表盘是必需的。如果我尝试将这些权限添加到我的移动设备和可穿戴设备清单中,它仍然会出现相同的错误。
这是一个新问题,因为我在 Play 商店中有一个可以运行的 beta 版本,但后来我更新到 API 23。这可能是什么原因造成的?
【问题讨论】:
标签: android wear-os android-permissions android-6.0-marshmallow