当前位置:网站首页>After flutter was upgraded from 2.2.3 to 2.5, the compilation of mixed projects became slower
After flutter was upgraded from 2.2.3 to 2.5, the compilation of mixed projects became slower
2022-06-25 16:00:00 【Favorite grapes】
Catalog
As the title ,Flutter from 2.2.3 Upgrade to 2.5 After the version ,build The time is very long , It is found that all the dependency information in the project is printed in the built console , Lead to longer time .
Solution 1
look for flutter SDK Storage location of , modify flutter.gradle file :
File path :$flutter_sdk$/packages/flutter_tools/gradle/flutter.gradle
apply plugin: FlutterPlugin
class FlutterPlugin implements Plugin<Project> {
......
@Override
void apply(Project project) {
this.project = project
def rootProject = project.rootProject
// Just adjust this paragraph of notes
// rootProject.tasks.register('generateLockfiles') {
// rootProject.subprojects.each { subproject ->
// def gradlew = (OperatingSystem.current().isWindows()) ?
// "${rootProject.projectDir}/gradlew.bat" : "${rootProject.projectDir}/gradlew"
// rootProject.exec {
// workingDir rootProject.projectDir
// executable gradlew
// args ":${subproject.name}:dependencies", "--write-locks"
// }
// }
// }
......
}
Solution 2
take gradle Version upgrade to and flutter The version used is consistent , here 2.5.1 Corresponding gradle Version is ,6.7.0
The analysis process
1、build A lot is printed in the window dependence Information
build In the process of ,build The window will print out the operation of each step , In the view window , I found that a lot of dependence Information , I remember in gradle There is such an instruction in the instruction of , You can print all dependence Information about , At that time, it was to check whether there were repeated dependencies . The print here may be some build Mission , This information was printed .
2、 Analyze recent code changes
Restore the code to a branch state , See if it's because of the recent gradle Problems caused by modification , After switching the branch, no change occurs , The above information is still printed .
3、 Only recently flutter upgrade
Later, I thought that recently, only right flutter Upgraded , therefore , take flutter Degraded , After demotion, I found build The process no longer prints dependent information , Upgrade it back ,build The process presents dependent information .
4、 lookup flutter Module building process
Since it is flutter Module problem , Then check its build file , So in the module gradle The following line is found in
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
Then find the corresponding file , It is found that all dependent codes are added to the code . So I adjusted the notes to , You can cancel printing all dependent information . The framework process returns to normal , No longer takes too long .
边栏推荐
- Continuous integration of aspnetcore & cloud flow
- Mark the same items in the Li list in red
- What is OA
- Educational administration system development (php+mysql)
- Traversal and branch judgment of JS (case on June 24, 2022)
- Rxjs TakeUntil 操作符的学习笔记
- Introduction to MgO 256gb NAND flash chip
- Linux-MySQL数据库之高级SQL 语句一
- Servlet详解
- Why does golang's modification of slice data affect the data of other slices?
猜你喜欢
Understand the execution sequence of try catch finally in one diagram
The release of autok3s v0.5.0 continues to be simple and friendly
Sword finger offer 09 Implementing queues with two stacks
基于深度Q学习的雅达利打砖块游戏博弈
Open the box to experience rust, come on!!!
Free books! AI across the Internet paints old photos. Here is a detailed tutorial!
李飞飞团队将ViT用在机器人身上,规划推理最高提速512倍,还cue了何恺明的MAE
Stop "outsourcing" Ai models! The latest research finds that some "back doors" that undermine the security of machine learning models cannot be detected
Report on Hezhou air32f103cbt6 development board
Desktop development (Tauri) opens the first chapter
随机推荐
Stop "outsourcing" Ai models! The latest research finds that some "back doors" that undermine the security of machine learning models cannot be detected
Based on neural tag search, the multilingual abstracts of zero samples of Chinese Academy of Sciences and Microsoft Asiatic research were selected into ACL 2022
Power representation in go language
Asynchronous processing of error prone points
Startup and shutdown of appium service
Sword finger offer 09 Implementing queues with two stacks
Multithreading, parallelism, concurrency, thread safety
Don't underestimate the integral mall, its role can be great!
教务系统开发(PHP+MySQL)
解析数仓lazyagg查询重写优化
Mt60b1g16hc-48b:a micron memory particles FBGA code d8bnk[easy to understand]
How to reload the win10 app store?
Free books! AI across the Internet paints old photos. Here is a detailed tutorial!
Consumer and producer cases of inter thread synchronization (condition variable)
Why does golang's modification of slice data affect the data of other slices?
Popular cross domain
Tensorflow loading cifar10 dataset
将一个文件写入到另一个文件的标记位置
Message format of Modbus (PLC)
Differences between = = and = = = in JS (detailed explanation)