Android Studio 2.3 Update not opening app [Instant Run Service]

只谈情不闲聊 提交于 2019-12-03 09:08:38

问题


I recently updated the Android Studio to 2.3. When I hit the instant run button, It compiles the app but doesn't open the app on the Android device. Even 'Hot Swap' is not enabled after that, it shows "No active 'app' launch". Any idea what I might be doing wrong. I tried creating a new project, but this error exists in that also.

I am getting below error:

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

回答1:


Got the same error after updating. As already noted, there's an open discussion on this topic. So far, the only work-around is that you actually disable instant run, that's the only thing that worked for me. You can do so in Preferences -> Build, Execution, Deployment -> Instant Run:

Turn it off and run the app again and it's going to work. That's the best we can do at this point.




回答2:


This is a device related bug. There is a google issue discussion:

https://code.google.com/p/android/issues/detail?id=235879

They have found some solutions:

  • Asus devices: you have to allow auto-start for apps you want to start with instant run https://www.asus.com/support/faq/1013752

  • Devices with MIUI: you have to disable MIUI optimization (see other answer in stackoverflow) https://stackoverflow.com/a/42579815/1341576



来源:https://stackoverflow.com/questions/42570016/android-studio-2-3-update-not-opening-app-instant-run-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!