flutter-setup
Skill7 starsChanged 8 months agoMITView on GitHub
Complete Flutter SDK installation, IDE configuration, and troubleshooting guide for Linux, macOS, and Windows. Use for installing Flutter SDK from scratch, configuring PATH environment variables across platforms, setting up VS Code/Android Studio/IntelliJ IDEA with Flutter plugins, resolving 'flutter command not found' errors, fixing flutter doctor warnings and errors, troubleshooting Android SDK/NDK installation issues, configuring Xcode and CocoaPods on macOS, installing Visual Studio C++ build tools on Windows, resolving PATH conflicts and SDK path issues, fixing network/proxy setup problems, debugging IDE plugin activation, configuring emulators and simulators, handling platform-specific build errors, resolving dependency conflicts, fixing certificate and signing issues, troubleshooting hot reload failures, and verifying successful installation with flutter doctor diagnostics.
- Installs packages
In this repository41 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- skill-creatorSkill
- flutter-dbSkill
- flutter-routingSkill
- flutter-state-managementSkill
- configuring-codemagicSkill
- applying-effective-dartSkill
- deploying-with-fastlaneSkill
- integrating-firebaseSkill
- implementing-fl-chartSkill
- integrating-google-adsSkill
- animating-flutter-widgetsSkill
- routing-with-autorouteSkill
- implementing-flutter-blocSkill
- configuring-deep-linksSkill
- persisting-data-with-driftSkill
- building-flutter-production-appsSkill
- generating-flutter-uiSkill
- routing-with-gorouterSkill
- managing-hive-storageSkill
- using-flutter-hooksSkill
- running-flutter-isolatesSkill
- managing-flutter-provider-stateSkill
- implementing-responsive-layoutsSkill
- implementing-riverpodSkill
- managing-secure-storageSkill
- managing-shared-preferencesSkill
- implementing-flutter-social-authSkill
- flutter-testingSkill
- using-fpdartSkill
- generating-freezed-modelsSkill
- configuring-github-actionsSkill
- building-jaspr-web-appsSkill
- testing-with-marionetteSkill
- implementing-openapi-in-dartSkill
- integrating-revenuecatSkill
- integrating-sentrySkill
- developing-serverpod-backendSkill
- building-shadcn-flutter-uiSkill
- integrating-supabaseSkill
- converting-ts-to-dartSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 14 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Before starting Flutter installation, verify:
- Distinctive: line 35
Add Flutter to your shell configuration file:
- Distinctive: line 80
Run the Flutter doctor command to check installation status:
- Distinctive: line 141
Search for "Flutter" and install
- Distinctive: line 142
Search for "Dart" and install
- Distinctive: line 164
Verify Flutter installation path exists
- Very specific: line 167
Check PATH with: echo $PATH (Linux/macOS) or echo $env:Path (PowerShell)
- Distinctive: line 168
Ensure no typos in path (check forward/backward slashes)
- Distinctive: line 176
Check "Android SDK Command-line Tools (latest)"
- Very specific: line 178
Run flutter doctor --android-licenses and accept all
- Distinctive: line 188
Ensure Android SDK Command-line Tools installed
- Very specific: line 204
Run flutter doctor to verify
- Distinctive: line 226
If gem installation fails, use Homebrew:
- Very specific: line 258
Check which Flutter is active: which flutter (Linux/macOS) or where flutter (Windows)
- Distinctive: line 259
Remove duplicate PATH entries
- Very specific: line 267
VS Code: Add to settings.json:
- Very specific: line 272
Verify path points to SDK root (contains bin/, packages/, etc.)
- Distinctive: line 278
Ensure app running in debug mode (not release)
- Distinctive: line 279
Check IDE console for connection errors
- Very specific: line 288
Update Gradle wrapper: Edit android/gradle/wrapper/gradle-wrapper.properties
- Very specific: line 296
Check android/app/build.gradle for correct compileSdkVersion and minSdkVersion
- Very specific: line 302
After resolving all flutter doctor issues:
- Distinctive: line 390
If any issues persist after following this guide, consult platform-specific references or Flutter's official troubleshooting documentation.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flutter Environment Setup & Troubleshooting Guide
Goal
Establish a reliable, optimized Flutter development environment across Linux, macOS, and Windows platforms. This guide covers initial SDK installation, PATH configuration, IDE setup, and comprehensive troubleshooting for common setup issues, dependency conflicts, and tooling misconfigurations.
Prerequisites Checklist
Before starting Flutter installation, verify:
- Disk Space: Minimum 2.8 GB for SDK, plus additional space for IDEs and Android SDK
- Network Access: Stable internet connection for downloading SDK and dependencies
- Administrative Access: Ability to modify system PATH and install software
- Git Installed: Required for Flutter SDK management and updates
🚀 Installation Process
Step 1: Download and Extract Flutter SDK
- Download the latest stable Flutter SDK from flutter.dev for your platform
- Extract to a permanent location (avoid temporary directories)
- Important: Choose paths without spaces or special characters
Recommended Installation Paths:
- Linux/macOS:
~/development/flutteror/opt/flutter - Windows:
C:\develop\flutter(NEVER useC:\Program Files\)
Step 2: Configure PATH Environment Variable
Linux/macOS PATH Configuration
Add Flutter to your shell configuration file:
For Bash (~/.bashrc or ~/.bash_profile):
export PATH="$PATH:$HOME/development/flutter/bin"
export PATH="$PATH:$HOME/development/flutter/.pub-cache/bin"For Zsh (~/.zshrc):
export PATH="$PATH:$HOME/development/flutter/bin"
export PATH="$PATH:$HOME/development/flutter/.pub-cache/bin"For Fish (~/.config/fish/config.fish):
set -gx PATH $PATH $HOME/development/flutter/bin
set -gx PATH $PATH $HOME/development/flutter/.pub-cache/binApply changes immediately:
source ~/.bashrc # or ~/.zshrc or ~/.bash_profileWindows PATH Configuration
Method 1: PowerShell (Recommended)
$flutterPath = "C:\develop\flutter\bin"
$currentPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)
if ($currentPath -notmatch [regex]::Escape($flutterPath)) {
[Environment]::SetEnvironmentVariable("Path", "$currentPath;$flutterPath", [EnvironmentVariableTarget]::User)
}Method 2: GUI
- Open System Properties → Advanced → Environment Variables
- Under "User variables", select
Path→ Edit - Click "New" and add
C:\develop\flutter\bin - Click OK and restart terminal
Important: Close and reopen all terminal windows after PATH changes.
Step 3: Verify Installation
Run the Flutter doctor command to check installation status:
flutter doctor -vThis command checks for:
- Flutter SDK installation
- Android toolchain (Android SDK, NDK, Platform Tools)
- Chrome (for web development)
- Visual Studio / Xcode (platform-specific)
- Connected devices
- IDE plugins
🔧 Understanding Flutter Doctor Output
Doctor Check Categories
[✓] Flutter - SDK properly installed and in PATH [✓] Android toolchain - Android SDK, licenses, build tools configured [✓] Chrome - Web development support available [✓] Visual Studio (Windows) - C++ build tools for desktop apps [✓] Xcode (macOS) - iOS/macOS development tools [✓] Android Studio - IDE and Android SDK integration [✓] VS Code - Lightweight IDE with Flutter extension [✓] Connected device - Physical device or emulator detected
[!] Warning - Optional component missing or needs attention [✗] Error - Critical component missing or misconfigured
💻 IDE Setup Best Practices
Visual Studio Code Setup
- Install VS Code from code.visualstudio.com
- Install Flutter extension:
Ctrl+P→ext install Dart-Code.flutter - Install Dart extension (auto-installed with Flutter)
- Restart VS Code
Recommended VS Code Settings:
{
"dart.flutterSdkPath": "C:\\develop\\flutter",
"dart.debugExternalPackageLibraries": true,
"dart.debugSdkLibraries": false,
"[dart]": {
"editor.formatOnSave": true,
"editor.selectionHighlight": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": false
}
}Android Studio Setup
- Download and install Android Studio
- Open Plugins:
File → Settings → Plugins(Windows/Linux) orAndroid Studio → Preferences → Plugins(macOS) - Search for "Flutter" and install
- Search for "Dart" and install
- Restart Android Studio
- Configure Android SDK:
Tools → SDK Manager- Install latest Android SDK Platform
- Install Android SDK Command-line Tools
- Install Android SDK Build-Tools
- Install Android Emulator
IntelliJ IDEA Setup
- Open Plugins:
File → Settings → Plugins - Install Flutter plugin (includes Dart)
- Restart IntelliJ IDEA
- Configure Flutter SDK path:
File → Settings → Languages & Frameworks → Flutter
🛠️ Common Issues & Troubleshooting
Issue 1: "flutter: command not found"
Cause: Flutter bin directory not in system PATH
Solutions:
- Verify Flutter installation path exists
- Re-add to PATH using platform-specific instructions above
- Restart terminal/IDE completely
- Check PATH with:
echo $PATH(Linux/macOS) orecho $env:Path(PowerShell) - Ensure no typos in path (check forward/backward slashes)
Issue 2: "cmdline-tools component is missing"
Cause: Android SDK Command-line Tools not installed
Solution:
- Open Android Studio
- Navigate to
Tools → SDK Manager → SDK Tools - Check "Android SDK Command-line Tools (latest)"
- Click "Apply" and wait for installation
- Run
flutter doctor --android-licensesand accept all
Issue 3: Android License Status Unknown
Cause: Android SDK licenses not accepted
Solution:
flutter doctor --android-licensesPress y to accept each license. If this fails:
- Ensure Android SDK Command-line Tools installed
- Set ANDROID_HOME environment variable:
- Linux/macOS:
export ANDROID_HOME=$HOME/Android/Sdk - Windows:
setx ANDROID_HOME "C:\Users\%USERNAME%\AppData\Local\Android\Sdk"
- Linux/macOS:
- Retry license acceptance
Issue 4: Visual Studio Not Found (Windows)
Cause: Visual Studio not installed or missing C++ workload
Solution:
- Install Visual Studio 2022 (Community edition works)
- During installation, select "Desktop development with C++"
- Include these individual components:
- MSVC v142+ build tools
- Windows 10/11 SDK
- C++ CMake tools
- Run
flutter doctorto verify
Issue 5: Xcode Not Configured (macOS)
Cause: Xcode not installed or command-line tools not configured
Solution:
# Install Xcode from Mac App Store, then:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
sudo xcodebuild -license acceptIssue 6: CocoaPods Not Installed (macOS)
Cause: CocoaPods required for iOS plugin dependencies
Solution:
sudo gem install cocoapods
pod setupIf gem installation fails, use Homebrew:
brew install cocoapodsIssue 7: "Unable to find git in your PATH"
Cause: Git not installed or not in PATH
Solution:
- Linux:
sudo apt-get install git - macOS:
brew install gitor install Xcode Command Line Tools - Windows: Download from git-scm.com and ensure "Git from command line" option selected
Issue 8: Network/Proxy Issues
Cause: Corporate proxy or firewall blocking Flutter downloads
Solution: Configure Flutter to use proxy:
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080
export NO_PROXY=localhost,127.0.0.1
flutter config --no-analytics # Disable analytics if blockedFor persistent configuration, add to shell profile.
Issue 9: Multiple Flutter Versions Conflict
Cause: Multiple Flutter installations or conflicting PATH entries
Solution:
- Check which Flutter is active:
which flutter(Linux/macOS) orwhere flutter(Windows) - Remove duplicate PATH entries
- Uninstall unused Flutter installations
- Clear Flutter cache:
flutter cleanin project directories
Issue 10: IDE Plugin Not Detecting Flutter SDK
Cause: IDE cannot locate Flutter SDK
Solution:
- VS Code: Add to settings.json:
{"dart.flutterSdkPath": "/path/to/flutter"} - Android Studio/IntelliJ:
Settings → Languages & Frameworks → Flutter → Flutter SDK path - Verify path points to SDK root (contains
bin/,packages/, etc.)
Issue 11: Hot Reload Not Working
Cause: IDE not properly connected or outdated Flutter version
Solution:
- Ensure app running in debug mode (not release)
- Check IDE console for connection errors
- Restart app with
rin terminal or IDE restart button - Update Flutter:
flutter upgrade - Clear build cache:
flutter clean
Issue 12: Build Failed - Gradle Issues (Android)
Cause: Gradle configuration or network issues
Solution:
- Update Gradle wrapper: Edit
android/gradle/wrapper/gradle-wrapper.properties - Clear Gradle cache:
cd android ./gradlew clean cd .. flutter clean - Check
android/app/build.gradlefor correctcompileSdkVersionandminSdkVersion
✅ Post-Installation Verification
After resolving all flutter doctor issues:
- Create test project:
flutter create test_app cd test_app - Run on available device:
flutter devices # List available devices flutter run # Run on default device - Test hot reload: Make a change to
lib/main.dartand pressrin terminal - Build release version:
flutter build apk # Android flutter build ios # iOS (macOS only) flutter build windows # Windows desktop flutter build macos # macOS desktop flutter build linux # Linux desktop
📚 Platform-Specific Configuration Guides
For detailed platform-specific setup instructions:
- 🐧 Linux Development Setup
- 🍎 macOS Development Setup
- 🪟 Windows Development Setup
🔍 Additional Diagnostic Commands
Check Flutter version:
flutter --versionUpdate Flutter SDK:
flutter upgradeCheck Flutter channel (stable/beta/dev):
flutter channelSwitch to stable channel:
flutter channel stable
flutter upgradeClear Flutter cache:
flutter clean
flutter pub cache repairAnalyze project for issues:
flutter analyzeCheck for dependency updates:
flutter pub outdated🎯 Success Criteria
Your Flutter environment is properly configured when:
flutter doctor -vshows all green checkmarks (or acceptable warnings)flutter --versiondisplays version informationflutter deviceslists at least one available deviceflutter create test_project && cd test_project && flutter runsuccessfully launches app- IDE recognizes Flutter SDK and provides code completion
- Hot reload works (press
rduring debug session)
If any issues persist after following this guide, consult platform-specific references or Flutter's official troubleshooting documentation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

