Android Studio 2.0 Instant Run无效(Instant Run没有闪电符号)
来源:互联网 发布:ios软件开发教程 编辑:程序博客网 时间:2024/05/21 06:19
最近刚把Android Studio更新到了2.0 Beta4,但是却发现在老项目上Instant Run用不了(没有闪电符号),尽管我已经:
1)把gradle升级到了2.10
2)把项目根目录的build.gradle中的gradle插件也更新到了2.0.0-beta2
<pre name="code" class="java">buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.0.0-beta2' }3)开启了选项里的Instant Run
但是依然不行。
后来尝试在StackOverFlow等上面搜索之后,最终找到了解决办法(不知道具体哪条起了决定性的作用):
1)去除build.gradle中的,preDexLibraries = false
2)去除build.gradle中的,去除multiDexEnabled = true
3)看看gradle.properities里是不是空的,正常应该空的才对(不考虑Parallel)
4)去除dependencies中的重复依赖。
(这里如果有重复的,也可能会产生如下错误:
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
这种情况需要你执行gradle -q dependencies,会出来一个树状图,其中用"->"会标示出冲突的部分。
比如LeanCloud的SDK中可能包含了与你其他的库中不同版本的httpclient或者okhttp。然后使用exclude group关键字来排除重复的库。比如
compile ("cn.leancloud.android:avoscloud-sdk:v3.13"){ exclude group: 'org.apache.httpcomponents'//exclude module:'okhttp' }
参考文献:
1)http://blog.csdn.net/sahadev_/article/details/50314141
2)http://www.open-open.com/lib/view/open1431391503529.html
0 0
- Android Studio 2.0 Instant Run无效(Instant Run没有闪电符号)
- Android Studio 2.0 Instant Run问题
- Android Studio 2.0 Instant Run问题BootstrapApplication
- Android Studio 2.0 Instant Run问题解决方法
- Android Studio Instant Run注意事项
- Android Studio之Instant Run
- Android Studio中的Instant Run
- android studio Instant Run 问题
- Android Studio中Instant Run
- studio设置Instant Run
- Android Instant Run
- Android Instant Run
- Android Studio Instant Run 的一个bug
- Android Studio Instant Run 官方介绍翻译
- Android Studio Instant Run的工作原理
- Android Studio新功能,了解Instant Run
- Android Studio Instant Run的工作原理
- android studio 2.3与instant run
- Consumer Prefetch
- C语言深度解剖学习笔记
- JQuery
- 1073. Scientific Notation (20)
- 关于eclipse查看httpservlet等源代码关联了.jar之后仍然看不到源代码的情况
- Android Studio 2.0 Instant Run无效(Instant Run没有闪电符号)
- 服务器接收Android客户端中文乱码解决
- 基于Win API,通过算法实现圆与鼠标指针(点)的碰撞的模拟
- 重学OpenGL(一)----工具篇
- HTML标签(按功能排序)
- 1074. Reversing Linked List (25)
- BootStrap学习
- AVR121-使用过采样增加ADC精度
- 正则表达式抓取网页数据 制作iOS小词典