问题描述
我是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在设备上卸载并重新运行应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!