I’ve been teaching myself Flutter the past couple of months and made a simple app that translates English input into Morse code. It worked great! I decided to go back and tinker with it the other day, and the only thing I changed was adding a new Padding widget that contains a TextField child. There are no initial errors in the code that I can see…
Padding( padding: EdgeInsets.all(16.0), child: TextField( decoration: InputDecoration(hintText: 'Input here'), style: TextStyle( fontSize: 15, color: Colors.black, ), ), ),
However, when I run it I get this massive error (see attached image). I have the top half as well, but the forum would only let me post one screenshot.
Invalid depfile: /filePath/ .dart_tool/flutter_build/b3f8bc0aa94bb70d2ac0ad4dc55117d8/kernel_snapshot.d
Error: Could not resolve the package ‘characters’ in ‘packaage:character/characters.dart’.
/…/…/flutter/packages/flutter/lib/src/material/text_field.dart:9:8: Error: Not found: ‘package:characters/characters.dart’
I’m still fairly new to coding, so I don’t fully understand what it is or how to begin fixing it. I did update Flutter before this happened but when I run flutter doctor it says that everything is fine?? I’m not using xcode, so I haven’t been overly concerned about that.
What does this “Invalid depfile” error mean and how do I fix it?
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.1, on Mac OS X 10.12.6 16G2136, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side’s plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
sudo gem install cocoapods
[✓] Android Studio (version 4.0)
[✓] Connected device (1 available)
! Doctor found issues in 1 category.