Android Studio 升级2.3以后无法启动App的解决方案

今天升级了2.3版本,发现点击run之后应用无法自动启动,并有这样的报错:

Error while executing: am startservice com.example.codingmaster.testcc/com.android.tools.fd.runtime.InstantRunService Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.codingmaster.testcc/com.android.tools.fd.runtime.InstantRunService } Error: Not found; no service started.

我的手机是一加3,AndroidN

搜索了一波,结论是现在需要在手机中提供自应用自启动的权限,在设置中允许应用自启动后点击run就可以跑起来了。