简体   繁体   English

如何在 Android Studio 4 上禁用即时运行?

[英]How can I disable instant run on Android Studio 4?

I saw a similar question but none of the answers actually tell you how to disable it, just give workarounds for the issue.我看到了一个类似的问题,但实际上没有一个答案告诉您如何禁用它,只是提供解决问题的方法。 I want to totally disable instant run, how can I do that?我想完全禁用即时运行,我该怎么做?

The issue I have is that no matter what I do, use the run button, the debug button, the apply changes button, clean, etc, any code I just wrote won't run until I uninstall the app on the phone, if I don't do that all I see is the old code running.我遇到的问题是,无论我做什么,使用运行按钮、调试按钮、应用更改按钮、清理等,我刚刚编写的任何代码在我卸载手机上的应用程序之前都不会运行,如果我不要那样做,我看到的只是运行的旧代码。 I'm guessing instant run is the issue since I always get the message that says App restart successful without requiring re-install .我猜即时运行是问题所在,因为我总是收到消息说App restart successful without requiring re-install

From android studio 3.5 and above you cant disable it but if your running an earlier version: Go to Android Studio Settings or Preferences (for MAC) -> Build,Execution,Deployment -> Instant Run.从 android studio 3.5 及更高版本开始,您无法禁用它,但如果您运行的是早期版本:转到 Android Studio 设置或首选项(对于 MAC)-> 构建、执行、部署-> 即时运行。 Then deselect the "Enable Instant Run" checkbox at the top.然后取消选择顶部的“启用即时运行”复选框。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM