如何在使用 Android Studio 的设备上卸载并重新运行应用程序? [英] How do I uninstall and re-run an app on a device using Android Studio?

查看:32
本文介绍了如何在使用 Android Studio 的设备上卸载并重新运行应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Android Studio 的新手,我觉得我一定做错了什么.在实际设备上运行 MyApp 时,过程如下所示.

I am new to Android Studio and I feel that I must be doing something wrong. When running MyApp on an actual device the process goes like this.

  • 编辑代码.
  • 在 Android Studio 中选择 Run 命令.(Shift+F10)
  • 发现错误(在手机上)
  • 导航至设置 --> 应用程序 --> MyApp(在手机上)
  • 强制停止(在手机上)
  • 卸载 MyApp(在手机上)
  • 修改代码
  • 在 Android Studio 中选择运行"命令.
  • 一次又一次地重复.
  • Edit code.
  • Select the Run command in Android Studio. (Shift+F10)
  • Discover a Bug (on phone)
  • Navigate to Settings --> Application --> MyApp (on phone)
  • Force Stop (on phone)
  • Uninstall MyApp (on phone)
  • Edit code
  • Select the 'Run' command in Android Studio.
  • Repeat again and again.

这是重复且耗时的.有没有办法通过 Android Studio 卸载 MyApp?

This is repetitive and time consuming. Is there a way to uninstall MyApp via Android Studio?

如果没有,还有其他更自动化的方法吗?

If not is there some other more automated way to do this?

顺便说一句,我已经看到这个问题 如何在安装新版本之前从设备上自动卸载 android 应用,但它没有充分解决问题.

BTW I have seen this question How to automatically uninstall android app from device before installing a new version but it does not sufficiently address the issue.

推荐答案

您可以通过再次点击 run 来跳过强制停止和卸载步骤.Android Studio 应该会提示您在哪个设备上运行,您可以在那里选择您连接的设备.

You can skip the force stop and uninstall step by just hitting run again. Android Studio should prompt you which device to run on and there you can select your connected device.

它将关闭应用程序并重新运行您更改的版本.

It will close the app and re-run your changed version.

这篇关于如何在使用 Android Studio 的设备上卸载并重新运行应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆