发错节点了,应该发到 android 上的
https://www.youtube.com/watch?v=AefJXhCxrK8
发现效果很好,原来编译需要 30s 的项目现在 2s 就能搞定了。
现在存在的问题
Here are also some known issues that we are working on:
Apps that are using legacy multi-dex (with minSdkVersion < 21), with a main dex file near the 65K method limit may not build. This would require reworking the app to make room in the main dex list by reducing the number of classes required in the main dex file.
We have tested Instant Run on many devices, but it ’ s impossible to try it on every single device model. Please let us know if Instant Run doesn ’ t work on your device.
We have seen some intermittent issues where the IDE loses connection with the app which will trigger a full rebuild.
We have not yet tested this feature with 3rd party Gradle plugins, especially those that have not been updated to use the new transforms API. If you run into issues, please let us know.
Data-binding is broken in this build; we will restore this shortly.
对我来说唯一不在生产项目上用的理由就是 data-binding 了,不过估计很快就能修复了。
1
ufo22940268 OP |
2
wintersun 2015-11-24 09:30:35 +08:00
的確很酷,但是很擔心要多强大的機器才能流暢跑動?
像我這種前後臺一起開發的,好怕怕啊 |
3
ufo22940268 OP @wintersun instant run 的实现机制好像是不需要重新 push 整个 apk , push 变化的部分,然后就能看到最新的修改,并不是 instant build 。所以 build 还是手动的。对机能要求应该不会高。
我也是前后端一起开发,一点都不担心机能的问题,因为原来 android 对机能的要求就已经够苛刻了。 |
4
zhangchioulin 2015-11-24 09:49:59 +08:00
作为 iOSer 我只希望 Xcode 的 bug 能少点,稳定点
|
5
ctftemp 2015-11-24 10:26:56 +08:00
cool
|
6
hronro 2015-11-24 10:33:47 +08:00
react native 倒是也是这种边改代码就能边看到效果。
|
7
Makoshan 2015-11-24 11:50:51 +08:00
http://v2ex.com/t/238456 lz 贴新闻,不自己试试, 我这边编译 data-binding 没有问题。
|
8
ufo22940268 OP @Makoshan 你说的是 data-binding 格式的 xml 也能做到 instant run 吗?
我试过,我这边是不可以的。编译能够通过,但是没法 instant run |
9
Makoshan 2015-11-24 12:07:56 +08:00 1
@ufo22940268 Data-binding is broken 的问题应该已经修复, Instant run 要升级 Gradle 的版本,先 push 到手机, run 的图标多了一个⚡️的符号,代码有变化再次 run 直接重启 Activity 。
|
10
ufo22940268 OP @Makoshan 赞,现在又可以了
|
11
baitouwei 2015-11-24 12:48:07 +08:00
升级后发现 MultiDex 好像有问题。升级到 `classpath 'com.android.tools.build:gradle:2.0.0-alpha1'` App 会崩溃,报 verifyerror 错误,回退后就正常了
|
12
zhouquanbest 2015-11-24 14:29:22 +08:00
Kotlin 不能用 MultiDex 有问题
还好我这次机智的单独安装 试用了下 Instant Run 明显没有收费的好 但毕竟是 Google 爹出的 只能先雪藏了 |