Upgrading your Expo SDK version to keep up with the latest App Store and Google Play requirements is usually a smooth process—until Gradle decides to punch you in the face with a cryptic asset compilation error.
If you just kicked off an Android build or ran a prebuild, and your terminal suddenly spit out a wall of red text looking exactly like this, you are not alone:
A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
error: resource drawable/splashscreen_logo (aka com.yourcompany.app:drawable/splashscreen_logo) not found.
The worst part about this error is that it doesn't give you a file name, a line number, or any mention of Expo.
It just drops a native Android resource compilation failure and leaves you to figure out the rest.
Let's break down exactly why this happens during Expo upgrades and how to fix it in two minutes flat.
Why This Happens: The Missing Asset Trap
This issue is a classic side effect of how newer Expo SDK versions handle Continuous Native Generation (CNG) via the expo-splash-screen plugin.
In older versions of Expo, if you only wanted a solid background color for your splash screen, you could get away with just defining backgroundColor in your config and skipping the logo image entirely.
The native generator would handle it gracefully.
However, in newer Expo SDK configurations, the prebuild engine has become much more strict.
If the image property is missing from your splash screen configuration, the Expo generator completely skips creating the native Android XML drawable references for the logo.
When the Android Gradle plugin compiles the app layer, it looks into the generated styles for the splash screen layout, tries to link the splashscreen_logo asset, finds a blank void, and crashes the entire build.
How to Fix It
To resolve this, we need to explicitly force the Expo prebuild engine to map a valid drawable resource so Gradle stops complaining.
Step 1: Update Your App Configuration
Open your app.json (or app.config.js) file and locate your plugins array.
Make sure the expo-splash-screen plugin block contains both a background color and an explicit path to a fallback image asset.
Even if you don't actually want a logo on your splash screen, you need to provide a placeholder image (like a tiny 1x1 transparent or solid pixel matching your background color) to satisfy the native compiler.
"plugins": [
[
"expo-splash-screen",
{
"backgroundColor": "#ffffff",
"image": "./assets/splash-icon.png"
}
]
]
Step 2: Clear and Regenerate Native Directories
Because native Android build directories heavily cache old configurations, simply changing app.json isn't always enough to clear out the corrupted Gradle state.
Run the following commands in your terminal to wipe the slate clean and force a fresh native generation:
# If you are testing local native builds:
npx expo prebuild --clean
# Or if you are running a fresh release compilation:
npx expo run:android --variant release --no-build-cache
Once the prebuild engine re-runs with the new configuration, it will successfully generate the splashscreen_logo.xml drawable file inside your native directories, and Gradle will breeze right past the linking stage.
Interactive Reference & Live Fix
If you want to view a fully verified configuration block or run this code through an interactive debugger to make sure your syntax matches up perfectly, you can check out the public resolution ledger here:
Final Thoughts
Native Android build failures often look terrifying because the error message points to generated resources rather than the actual configuration mistake.
In this case, the root cause is usually a missing splash screen image definition after upgrading to a newer Expo SDK version.
Once you add a valid image path and regenerate your native directories, the build should proceed normally.
Have you run into any other weird compilation errors while moving your project up to the latest Expo SDK?
Drop them in the comments below and let's unblock them.
Top comments (0)