当前位置:网站首页>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 .
边栏推荐
- 镁光256Gb NAND Flash芯片介绍
- Sword finger offer II 091 Paint the house
- Write one file to the marked location of another file
- LeCun预言AGI:大模型和强化学习都是斜道!我的「世界模型」才是新路
- 将一个文件写入到另一个文件的标记位置
- Webgl and webgpu comparison [4] - uniform
- Prototype mode
- Built in methods for data types
- 合宙Air32F103CBT6开发板上手报告
- Continuous integration of aspnetcore & cloud flow
猜你喜欢

Rxjs TakeUntil 操作符的学习笔记
How to convert a recorded DOM to a video file

Continuous integration of aspnetcore & cloud flow
Create raspberry PI image file of raspberry pie

Lecun predicts AgI: big model and reinforcement learning are both ramps! My "world model" is the new way

TFIDF and BM25

《睡眠公式》:怎么治睡不好?

通俗讲跨域

Describe your understanding of the evolution process and internal structure of the method area

How to reload the win10 app store?
随机推荐
Several ways of SQL optimization
分享自己平时使用的socket多客户端通信的代码技术点和软件使用
Understand the execution sequence of try catch finally in one diagram
JS中的==和===的区别(详解)
Pytest测试框架笔记
In the wechat environment, H5 jumps to the specified page of the applet
Educational administration system development (php+mysql)
TensorFlow加载cifar10数据集
GridLayout evenly allocate space
教务系统开发(PHP+MySQL)
TFIDF and BM25
MySQL modifier l'instruction de champ
Deep learning pytorch cifar10 dataset training "suggestions collection"
Load local cifar10 dataset
The style of the mall can also change a lot. DIY can learn about it!
什么是NFT数字藏品?
How to convert a recorded DOM to a video file
Analysis of the concept of metacosmic system
报错:homebrew-core is a shallow clone
一文带你搞懂 JWT 常见概念 & 优缺点