从命令行运行"Instant Run"

esp*_*chi 8 android android-gradle-plugin instant-run

我正在从Android Studio运行我的Android应用程序,并且Instant Run启动,这很棒.我想从命令行运行完全相同的东西.

在Android Studio的事件日志中,我看到了

22:00:28 Executing tasks: [:app:incrementalDevDebugSupportDex]
22:00:48 Gradle build finished in 20s 286ms
22:00:51 Instant Run applied code changes and restarted the current Activity.
Run Code Online (Sandbox Code Playgroud)

所以,我希望我能够从命令行运行该任务:./gradlew :app:incrementalDevDebugSupportDex.但是,没有找到:

FAILURE: Build failed with an exception.

* What went wrong:
Task 'incrementalDevDebugSupportDex' not found in project ':app'.
Run Code Online (Sandbox Code Playgroud)

有没有办法从命令行运行Instant Run?

小智 9

目前无法在Android Studio外部使用即时运行.这在Android开发者峰会上被提到过,但我不记得究竟在哪个谈话中.

  • 好吧,这是一个失望.我做了OP所做的.为什么他们会将这个功能绑定到IDE ... (5认同)