今天在开发时用Android studio debug方式往真机上安装app时,发现app可以正常安装,但是不能自动运行,
后来试了很多种网上说的方法尝试,都没解决问题,
在 AS的Event Log中看到如下信息:
Instant Run detected that you are running on a target device that has a work profile or multiple user accounts.
Launching the app under a work profile or another user account on the target device will result in a crash.
Learn more about how to run your app under a work profile.
最后再设置中,找到如下条目, 取消 Enable Instant Run to hot swap code/resource changes one deploy之前的复选框,
然后重新运行,发现app可以正常安装并运行了。