即时运行不起作用



当我单击运行时,我在Android Studio 2.3中遇到此问题:

03/09 19:02:36: Launching app
$ adb shell am startservice 
com.a890m.s/com.android.tools.fd.runtime.InstantRunService
Error while executing: am startservice com.a890m.s/com.android.tools.fd.runtime.InstantRunService
Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.a890m.s/com.android.tools.fd.runtime.InstantRunService }
Error: Not found; no service started.

此问题仅在Android Studio 2.3中,它仍然在Google Diseage Tracker中打开您可以通过在Android Studio中禁用即时运行,可以解决它(由于需要即时运行而不是Pereant解决方案)。goto-> Android Studio->首选项 ->构建,执行,部署 -> Instant Run

我之前遇到此错误,对我有用的解决方案是尝试拔下电缆并再次插入电缆,看看它是否有效

这是某些特定设备正在发生的,因为某些制造商已经定制了其设备并添加了某种"自动启动"阻滞剂。例如,对于受影响的华硕设备,您可以通过与ASUS的自动启动管理器为您的应用程序启用自动启动来解决此问题。有关详细信息,请参见此页面:https://www.asus.com/support/faq/1013752

但不同的制造商似乎做到了不同。例如,对于Leeco设备,您可以在设置下允许"自动发布"。有关如何为应用程序启用Auto-Launch。

您可以使用Google如何关闭特定设备的AutoStart/自动启动功能,以便即时运行进行工作。您也可以只使用模拟器。

希望会有所帮助。

最新更新