Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Flutter and app store releases

Android Studio Gradle sync fails with 'Missing ExternalProject for :'

Your error

Missing ExternalProject for :1 more line it can show

Fix it fast

Most common cause, 1 of 2

Flutter 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.

Fix
flutter upgrade

# android/local.properties
flutter.sdk=C:\\src\\flutter
sdk.dir=C:\\Users\\me\\AppData\\Local\\Android\\Sdk
Did this fix it?
Full steps for this cause: check, fix, verify

Short 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.

  • Applies to Flutter 3.50, expo-modules-autolinking 58.1, Expo SDK 58, Gradle 9.9, Android Gradle Plugin 9.5
  • Updated
  • By Maaz Zindani, Senior Software Engineer

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.

Run this first
grep -n "includeBuild" android/settings.gradle* settings.gradle* 2>/dev/null
grep -n "flutter.sdk" android/local.properties 2>/dev/null

Then find the line you see in this list and open its fix:

  1. 1Flutter on Windows wrote the SDK path with a lowercase drive letterflutter.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
  2. 2The included build is reached through a symlinkA 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.

Check
findstr flutter.sdk android\local.properties

Fix

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.

Fix
flutter upgrade

# android/local.properties
flutter.sdk=C:\\src\\flutter
sdk.dir=C:\\Users\\me\\AppData\\Local\\Android\\Sdk

Verify

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.

Verify
flutter --version

Confirmed by github.com

Did this fix it?

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.

Check
pnpm why expo-modules-autolinking

Fix

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.

Fix
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.

Verify
pnpm why expo-modules-autolinking

Confirmed by github.com

Did this fix it?

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.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.