简体   繁体   中英

Alternative methods for rebuilding flutter tools?

I recently asked this question about Flutter. Currently, the answer now gives a different error and, as the answer states, I might want to look at this segment of the code . So, I decide to fork the repo and begin my investigation. I currently just want to print out a couple of values in the section to figure out what is going on. To see what the program thinks I have, and what it doesn't think I have. I added a couple of printTrace statements and now I want to rebuild the project.

I went to CONTRIBUTING.md and found this:

The flutter tools itself is built when you run flutter for the first time and each time you run flutter upgrade . If you want to alter and re-test the tool's behavior itself, locally commit your tool changes in git and the tool will be rebuilt from Dart sources in packages/flutter_tools the next time you run flutter .

I don't want to exactly "change" anything at the moment, just print out some values and figure out what is going on. The issue is, doing these debugging changes forces me to do a commit. Is there a way to rebuild flutter tools without making a commit?

You can force the Flutter tools to rebuild by removing the build stamp. For example, if your Flutter install is in ~/.flutter-sdk , you can run

rm ~/.flutter-sdk/bin/cache/flutter_tools.stamp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM