如何在AndroidStudio 2.0中激活Instant Run [英] How to activate Instant Run in AndroidStudio 2.0

查看:562
本文介绍了如何在AndroidStudio 2.0中激活Instant Run的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android studio 2.0引入了即时运行工具,它不适用于我,
我知道2.0在预览频道中

Android studio 2.0 introduced instant run facility, its not working for me, I know 2.0 is in the preview channel

任何人都试过使用instarun工具2.0 ?

Anybody tried 2.0 with instarun facility?

推荐答案

默认情况下,为使用Android Gradle Plugin 2.0.0或更高版本构建的项目启用Instant Run。要使用最新版本的Gradle插件更新现有项目,请转到设置对话框:


在Mac上,单击 Android Studio→首选项

在Windows和Linux上,单击文件→设置

Instant Run is enabled by default for projects built using Android Gradle Plugin 2.0.0, or later. To update an existing project with the latest version of the Gradle plugin, go to the Settings dialog:

On Mac, click Android Studio → Preferences
On Windows and Linux, click File → Settings

在设置/首选项对话框中,转到构建,执行,部署→即时运行。
单击更新项目链接。出现提示时,单击确定。


如果未显示更新项目链接,则您的项目已经最新。

使用即时运行


In the Settings/Preferences dialog, go to Build, Execution, Deployment → Instant Run.
Click the Update Project link. When prompted, click OK.
If the the Update Project link does not appear, your project is already up to date.

Using Instant Run


要首先运行您的应用,请点击运行'app' (或调试'app')。 Android Studio将通过编译,删除,打包和安装.APK文件以及启动应用程序来运行您的应用。应用程序启动后,运行'app'按钮(或Debug'app'按钮)会出现小的黄色霹雳。这表示即时运行功能已准备就绪。

To first run your app, click Run ‘app’ (or Debug ‘app’ ). Android Studio will run your app by compiling, dexing, packaging and installing an .APK file, and launching the app. After your app has launched, a small, yellow thunderbolt will appear with the Run ‘app’ button (or Debug ‘app’ button). This indicates that the Instant Run feature is ready.

点击再次运行'app'(或调试'应用')将启动即时运行并且您的更改会在几秒钟内推送到已连接的设备。

Clicking Run ‘app’ (or Debug ‘app’) again will start an Instant Run and your changes are pushed to the connected device within a few seconds.

要终止设备上正在运行的应用,请点击停止'应用'

To terminate the running app on your device, click Stop ‘app’ .

这篇关于如何在AndroidStudio 2.0中激活Instant Run的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆