AndroidStudio部署项目时出现错误:Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled
2016-04-09 14:15
471 查看
今天更新了Android Studio,结果在部署项目到模拟器的时候出现了错误:Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled
原因
这个是由于Android Studio2.0新版本中的Instant Run (即时运行)引起的,什么是即时运行呢?
Instant Run in Android Studio 2.0 allows you to quickly make changes to your app code while your app is running on an Android device or Android Emulator. Instead of waiting
for your entire app to rebuild and redeploy after each code change, Android Studio 2.0 will try to incrementally build and push only the incremental code or resource change. Depending on the code changes you make, you can see the results of your change in
under a second. By simply updating your app to use the latest Gradle plugin ( '
它可以快速的更改运行在Android虚拟机中的APP,也就是说在Android虚拟机中的app还在运行的时候,就可以直接改变它的内部代码
开发者可以不用再等待整个应用程序重建以及每次代码更改后重新部署
简单来说就是改了代码后,点击即时运行,模拟器上的应用不需要重启就可以直接呈现出我们修改后的代码效果!
有关即时运行的google官方文档:
http://tools.android.com/tech-docs/instant-run
解决方法
点击工具栏中的Tools,选中Android,最后点击Enable ADB Integration,使其前面出现✔号就OK了
《Android疑难杂症》
原因
这个是由于Android Studio2.0新版本中的Instant Run (即时运行)引起的,什么是即时运行呢?
Instant Run in Android Studio 2.0 allows you to quickly make changes to your app code while your app is running on an Android device or Android Emulator. Instead of waiting
for your entire app to rebuild and redeploy after each code change, Android Studio 2.0 will try to incrementally build and push only the incremental code or resource change. Depending on the code changes you make, you can see the results of your change in
under a second. By simply updating your app to use the latest Gradle plugin ( '
com.android.tools.build:gradle:2.0.0-beta2’ ), you can take advantage of this time saving features with no other modifications to your code.
它可以快速的更改运行在Android虚拟机中的APP,也就是说在Android虚拟机中的app还在运行的时候,就可以直接改变它的内部代码
开发者可以不用再等待整个应用程序重建以及每次代码更改后重新部署
简单来说就是改了代码后,点击即时运行,模拟器上的应用不需要重启就可以直接呈现出我们修改后的代码效果!
有关即时运行的google官方文档:
http://tools.android.com/tech-docs/instant-run
解决方法
点击工具栏中的Tools,选中Android,最后点击Enable ADB Integration,使其前面出现✔号就OK了
《Android疑难杂症》
相关文章推荐
- 使用C++实现JNI接口需要注意的事项
- Android IPC进程间通讯机制
- Android Manifest 用法
- [转载]Activity中ConfigChanges属性的用法
- Android之获取手机上的图片和视频缩略图thumbnails
- Android之使用Http协议实现文件上传功能
- Android学习笔记(二九):嵌入浏览器
- android string.xml文件中的整型和string型代替
- i-jetty环境搭配与编译
- android之定时器AlarmManager
- android wifi 无线调试
- Android Native 绘图方法
- Android java 与 javascript互访(相互调用)的方法例子
- android 代码实现控件之间的间距
- android FragmentPagerAdapter的“标准”配置
- Android"解决"onTouch和onClick的冲突问题
- android:installLocation简析
- android searchView的关闭事件
- SourceProvider.getJniDirectories