AndroidStudio 更新后,项目没有错误,点击运行报错。Instant Run requires 'Tools | Android | Enable ADB integration' to b

AndroidStudio 更新后,项目没有错误,点击运行报错。Instant Run Requires,无法运行。

报错如图



原因
这个是由于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还在运行的时候,就可以直接改变它的内部代码
开发者可以不用再等待整个应用程序重建以及每次代码更改后重新部署
简单来说就是改了代码后,点击即时运行,模拟器上的应用不需要重启就可以直接呈现出我们修改后的代码效果!


解决方法

点击工具栏中的Tools,选中Android,最后点击Enable ADB Integration,使其前面出现✔号就OK了



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值