Flutter stutter I


Let’s delve more into Flutter today… If you are new to Flutter, sometimes it’s hard just to test the program on your emulator. In this “Flutter stutter” series of blog posts, we’ll talk about all the issues that can arise when trying to test apps on an emulator. One of the issues I had was this error message when I tried to start debug mode “…R.txt: The data is invalid”. This error sounds like maybe something is wrong with the app, like maybe a file is corrupt or something. When I first got this error, I went to the file that ended in “R.txt”, and it was a blank file, which didn’t really tell me much. Was the file supposed to be blank? Probably not, but I wouldn’t know where to start to fill out the file… Googling this issue, you’ll see posts saying to turn off antivirus. Personally, I use AVG antivirus, so the first time this happened, I went to turn off my AVG. I quickly realized that there was no off button. Googling “how to turn off AVG”, it says to click on the “^” icon in the bottom toolbar, which will bring up the hidden programs on the computer, then right click on the AVG icon. From there, clicking on the sliding knob, which should be green with the text “on”, should change it to the off icon, which is red with the text “off.” By and large, this is the way to resolve the invalid data for R.txt error, and debug mode should launch properly from there. However, there are a few additional details to keep in mind. For one, you want to turn off AVG before starting your IDE (like VS Code) since the antivirus will block certain functions from the start. Additionally, it’s not always easy to turn off AVG. Sometimes right-clicking the AVG icon doesn’t do anything. Sometimes multiple right clicks will do the trick, and sometimes the icon seems unresponsive to right-clicks at all, so don’t be surprised if that happens. Furthermore, I’ve noticed that sometimes I’ll forget to turn AVG off (after turning it back on after I’m done coding) and for some reason, debug mode runs fine. Granted, this isn’t the case a majority of the time, but sometimes I have AVG on by accident and debug mode actually runs. For the times that this happens, it seems like it works initially, but if I ever need to restart the debug again, the R.txt error message will pop up and debug mode will fail. Honestly, it’s a mystery as to what AVG antivirus is doing behind the scenes with Flutter…

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *