简体   繁体   English

从Real Device卸载Android Wear应用程序

[英]Uninstall Android Wear App From Real Device

Might be a noob question but for the life of me I can't figure out how to uninstall an app from my Samsung Gear Live. 可能是一个菜鸟问题,但对于我的生活,我无法弄清楚如何从我的Samsung Gear Live卸载一个应用程序。

I need to uninstall the debug version so I know I have a fresh production version when I download it from the Google Play store. 我需要卸载调试版本,所以当我从Google Play商店下载时,我知道我有一个全新的生产版本。

I don't know if there is a user interface for this. 我不知道是否有用户界面。 The easiest way I've found is via adb: 我找到的最简单的方法是通过adb:

adb uninstall [-k] <package> - remove this app package from the device
                               ('-k' means keep the data and cache directories)

So, for example: 所以,例如:

adb uninstall com.example.testandroidwear

As both @WaynePiekarski and @Thoast83 have mentioned, if the Android Wear device is connected via Bluetooth instead of a direct USB connection (eg when testing with the Moto 360) then you need to use adb -s <device> <command> as instructed by Directing Commands to a Specific Emulator/Device Instance in the adb documentation . 正如@WaynePiekarski和@ Thoast83都提到的那样,如果Android Wear设备通过蓝牙连接而不是直接USB连接(例如,在使用Moto 360进行测试时),那么您需要按照指示使用adb -s <device> <command>通过在adb文档中将命令定向到特定的仿真器/设备实例

In this case, it might be something like: 在这种情况下,它可能是这样的:

adb -s localhost:4444 uninstall com.example.testandroidwear

provided you have established the connection exactly as described in Debugging over Bluetooth (otherwise, adjust the port number accordingly). 如果您已完全按照通过蓝牙调试中所述建立连接(否则,请相应地调整端口号)。

如果有人通过蓝牙进行调试并偶然发现此线程,请写:

adb -s localhost:4444 uninstall example.com.yourappname

When you install an APK via the Play Store or via adb to the phone, the embedded wearable APK is automatically installed to the wearable. 当您通过Play商店或通过adb安装APK到手机时,嵌入式可穿戴设备APK会自动安装到可穿戴设备上。

If you are developing and want to play around with things, or if you are doing debug builds which do not do the embedded APK, you will need to use adb uninstall to both the phone and the wearable. 如果您正在开发并想要玩游戏,或者如果您正在进行不执行嵌入式APK的调试版本,则需要对手机和可穿戴设备使用adb uninstall。

You can use adb devices to discover the names of the connected devices, and then adb -s followed by the name of the device. 您可以使用adb设备发现已连接设备的名称,然后使用adb -s,后跟设备名称。 You use the internal package name with the uninstall command. 您可以将内部包名称与uninstall命令一起使用。

First use 'adb devices' to find all connected devices: 首先使用'adb devices'查找所有连接的设备:

$ C:\Program Files (x86)\Google\Cloud SDK>adb devices
List of devices attached
603KPSL029398   device
5c9cc2e0        device

Then run uninstall for app using adb on the desired device: 然后在所需设备上使用adb运行app for app:

$ C:\Program Files (x86)\Google\Cloud SDK>adb -s 603KPSL029398 uninstall com.example.android.support.wearable.notifications
Success

我建议使用127.0.0.1而不是localhost

adb -s 127.0.0.1:4444 uninstall example.com.yourappname

Even after uninstall, my watch (moto360 second gen, running android wear 1.5.03336103, Android os 6.0.1) shows the uninstalled apps. 即使在卸载后,我的手表(moto360第二代,运行android穿1.5.03336103,Android OS 6.0.1)显示了卸载的应用程序。 The apps was installed directly on the wear device from Studio. 这些应用程序直接安装在Studio的磨损设备上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从设备上卸载应用 - Uninstall App from device 当应用未运行时,从Android主机设备发送消息以穿戴 - Sending message from Android host device to wear when app is not running 从 Wear 应用程序检查 Wear 设备是否已连接到手持设备,2021 - From Wear app check if Wear device is connected to Handheld device, 2021 如何将在模拟器中运行的Android Wear连接到真实的Android设备(2016) - How to Connect Android Wear running in Emulator to a real Android Device (2016) Android Wear Preview应用与我的设备不兼容 - Android Wear Preview app is incompatible with my device 如何从设备上的命令行卸载 Android 应用程序 - How to uninstall an android app from command line on the device Android:如何从模拟器上卸载磨损表盘? - Android : How does one uninstall a wear watch face from the emulator? 在 android studio 中以编程方式将 apk 从本地资产目录安装/卸载到真实设备 - Programmatically install/uninstall apk from local asset directory to real device in android studio Android手机应用未在连接的Android Wear设备中安装该应用 - Android phone app is not installing the app in the connected android wear device android:使用设备管理员锁定卸载应用 - android: lock uninstall app using device admin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM