Repository: flutter
Issue: [tool_crash] FileSystemException: Cannot open file, OS Error: No such file or directory, errno = 2
Labels: c: crash,tool,P2,team-tool,triaged-tool

## Command
```
flutter --no-color pub get
```

## Steps to Reproduce
1. ...
2. ...
3. ...

## Logs
FileSystemException: Cannot open file, OS Error: No such file or directory, errno = 2
```
#0      _File.throwIfError (dart:io/file_impl.dart:635:7)
#1      _File.openSync (dart:io/file_impl.dart:479:5)
#2      ForwardingFile.openSync (package:file/src/forwarding/forwarding_file.dart:71:16)
#3      ErrorHandlingFile.copySync.<anonymous closure> (package:flutter_tools/src/base/error_handling_io.dart:308:22)
#4      _runSync (package:flutter_tools/src/base/error_handling_io.dart:573:14)
#5      ErrorHandlingFile.copySync (package:flutter_tools/src/base/error_handling_io.dart:307:5)
#6      CocoaPods.setupPodfile (package:flutter_tools/src/macos/cocoapods.dart:262:21)
<asynchronous suspension>
#7      injectPlugins (package:flutter_tools/src/plugins.dart:1226:9)
<asynchronous suspension>
#8      FlutterProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:322:5)
<asynchronous suspension>
#9      PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:167:5)
<asynchronous suspension>
#10     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1043:27)
<asynchronous suspension>
#11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#12     CommandRunner.runCommand (package:args/command_runner.dart:196:13)
<asynchronous suspension>
#13     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
<asynchronous suspension>
#14     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#15     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
```
```
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-x64, locale en-GB)
    • Flutter version 2.2.3 at /Users/ezraleconte/flutter
    • Framework revision f4abaa0735 (3 months ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/ezraleconte/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/ezraleconte/Library/Android/sdk
    • Java binary at: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Connected device (2 available)
    • iPhone 11 (mobile) • DB83792F-5D0C-4C89-9211-EE96D56A3FCF • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 94.0.4606.81

! Doctor found issues in 2 categories.

```

## Flutter Application Metadata
**Type**: app
**Version**: 1.0.0+1
**Material**: true
**Android X**: false
**Module**: false
**Plugin**: false
**Android package**: null
**iOS bundle identifier**: null
**Creation channel**: stable
**Creation framework version**: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
### Plugins
flutter_plugin_android_lifecycle-2.0.3
google_maps_flutter-2.0.9