Closed lhjgege closed 2 years ago
1、检查 根目录/.gradle/.rockectx/.app/ 文件夹缓存是否生成。 2、并查看 执行的task 是否只有 app module 和 改动的module (其他module 的task 理论是不允许执行) 3、以上两点都正常请贴一下:耗时图 4、第一次是全量无增速效果,请查看2 次以上修改code 的编译速度
我换一个手机点击安装的就会很慢
换一个手机点击安装感觉像是重新全量编译。
@lhj1079947827 换个手机 你可以用 assembledebug task 试试。 (直接点击 run ,as 对这方面有一定的处理)
你可以测试一下点击 run 在同一个手机的速度 是否有提升呢?
同一个手机有提升的。
但是不同手机点击安装没有提升每次都是全量编译的感觉。因为我这里有多个手机所以会安装很多手机。如果每个手机都是全量编译那么感觉速度还是没提升的感觉。同一个手机我刚才测试了提升很大从3分钟提升到25S
可以通过尝试使用 assembledebug task 运行(这个和换手机关系就不大了,应该可以满足你的需要)
@lhj1079947827 transformClassesWithASMPPluginForDebug 这个插件关闭是否会有影响:可以通过:
//app moudle 下的 build.gradle
android {
//...
//配置插件编译项
RocketX {
openLog = true
//加速模式 禁用可禁用的 transform ,速度更快
transFormList = ["ASMPPlugin"]
}
}
插件的名字你需要确认一下是不是 :ASMPPluginForDebug,通过在build log 查找关键字: transFormList ,会有提示。
@lhj1079947827 禁用之后 buildDex,以及 mergeDex 会更快。应该可以跑进10s内
你是禁用那个插件,是上面两个插件吗
禁用ASMPPlugin
@lhj1079947827 请问有效果吗?
我升级了我的项目到gralde7.0.3版本后每次运行起码的3分钟以上。在4.1.3版本的时候就很快,不知道是不是没有适配7.0的原因