Android Studio Gradle sync fails with 'Missing ExternalProject for :'
Fix it fast
Most common cause, 1 of 2Flutter on Windows wrote the SDK path with a lowercase drive letter
Upgrade Flutter to 3.35 or newer so local.properties is written with an uppercase drive letter.
flutter upgrade
# android/local.properties
flutter.sdk=C:\\src\\flutter
sdk.dir=C:\\Users\\me\\AppData\\Local\\Android\\SdkShort answer
Missing ExternalProject for : is an Android Studio sync failure for an includeBuild whose path does not match the folder's real path. Flutter before 3.35 wrote a lowercase drive letter into local.properties on Windows, and pnpm workspaces hand Expo's autolinking a symlinked folder. Upgrade Flutter or Expo SDK 58, or point includeBuild at the real path.
Which cause do you have?
Find every included build the Android project pulls in, and the path each one is given. The cause below depends on whether that path comes from flutter.sdk in local.properties or from a node_modules package.
grep -n "includeBuild" android/settings.gradle* settings.gradle* 2>/dev/null
grep -n "flutter.sdk" android/local.properties 2>/dev/nullThen find the line you see in this list and open its fix:
- 1Flutter on Windows wrote the SDK path with a lowercase drive letter
flutter.sdk in android/local.properties starts with a lowercase letter, such as c:\\src\\flutter, and the project is a Flutter app opened on Windows - 2The included build is reached through a symlink
A React Native or Expo app in a pnpm workspace, often with a patched dependency, or an includeBuild that points into a symlinked folder
What does the error look like?
Missing ExternalProject for :Gradle sync fails as soon as the android folder is opened in Android Studio
Cause 1 of 2
Flutter on Windows wrote the SDK path with a lowercase drive letter
You seeflutter.sdk in android/local.properties starts with a lowercase letter, such as c:\\src\\flutter, and the project is a Flutter app opened on Windows
Check
Missing ExternalProject for : in a Flutter project on Windows comes from the included flutter_tools build. The settings script includes $flutterSdkPath/packages/flutter_tools/gradle, where the path is read from local.properties, and Flutter's own fix for this error, shipped in 3.35, makes the drive letter uppercase when it writes that file.
findstr flutter.sdk android\local.propertiesFix
Upgrade Flutter to 3.35 or newer so local.properties is written with an uppercase drive letter. Until then, change the first letter of flutter.sdk (and sdk.dir) to uppercase by hand and sync again.
flutter upgrade
# android/local.properties
flutter.sdk=C:\\src\\flutter
sdk.dir=C:\\Users\\me\\AppData\\Local\\Android\\SdkVerify
flutter --version reports 3.35 or newer, local.properties starts with an uppercase drive letter, and the next Gradle sync in Android Studio finishes without the error.
flutter --versionConfirmed by github.com
Cause 2 of 2
The included build is reached through a symlink
You seeA React Native or Expo app in a pnpm workspace, often with a patched dependency, or an includeBuild that points into a symlinked folder
Check
Missing ExternalProject for : in a pnpm workspace usually means Android Studio received a symlinked path for an included build. Expo's changelog for expo-modules-autolinking 58.0.0 records exactly this sync failure and fixes it by resolving symlinks in the Gradle plugin sourceDir before it reaches includeBuild.
pnpm why expo-modules-autolinkingFix
Move to Expo SDK 58, whose expo package depends on expo-modules-autolinking 58.1. For an includeBuild you wrote yourself, pass the canonical path so the symlink is resolved before Gradle sees it.
pnpm add expo@^58.0.0
npx expo install --fix
// settings.gradle.kts, for your own included build
includeBuild(file("../shared-build").canonicalPath)Verify
Sync again; Android Studio imports the included build and the error does not return.
pnpm why expo-modules-autolinkingConfirmed by github.com
How do I stop it coming back?
- Keep Flutter on a current stable release; local.properties is regenerated by the tool, so hand edits are lost on the next write.
- Upgrade the expo package first and then run npx expo install --fix, the order Expo's upgrade guide gives, so autolinking moves with the SDK.
- Give includeBuild a canonical path whenever the folder may live behind a symlink, such as in a monorepo.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine on the same stack: TaxiDex, QistLock, Dispatch Pro.