Android Studio Apply Changes 询问我是否要重新启动应用程序

Android Studio Apply Changes asks if I want to Restart App

"Apply Changes" 按钮正在与另一个项目一起使用,但现在当我单击它时,我会看到一个弹出窗口,上面写着:

"Restart App? The app is already running. Would you like to kill it and restart the session?"

是什么导致它想要重新启动而不只是应用更改?

在这里你可以找到instant的详细描述运行:

https://developer.android.com/studio/run/index.html#instant-run

通常所有更改都必须编译并作为新应用程序重新发布到设备。当您的应用程序已经 运行 在设备上时,将显示此消息。 Android Studio 具有即时 运行 功能,启用此功能后无需重启即可应用更改,但这并非每次都有效。