expoeasturborepo

Expo EAS Build Fails on Android: "style/Theme.App.SplashScreen not found" Despite Using expo-splash-screen


Despite removing all manual references and expecting expo-splash-screen to generate everything needed, the build still fails with:

style/Theme.App.SplashScreen not found

Android resource linking failed ERROR: AndroidManifest.xml:22:5-27:16: AAPT: error: resource style/Theme.App.SplashScreen not found.

app.json app.json code image

eas.json (preview build) eas.json code image

What I Tried:

Removed custom splash theme definitions (styles.xml, colors.xml, drawable/, etc.)

Deleted the entire android/ folder and re-ran npx expo prebuild --clean

Cleared node_modules, yarn.lock, reinstalled everything

Verified image file exists and paths are correct

expo doctor still fails some checks (possibly preventing a clean prebuild)


Solution

  • The problem was solved by:

    the metro.config.json:

    const { getDefaultConfig } = require('expo/metro-config');
    const path = require('path');
    
    // Get the project root
    const projectRoot = __dirname;
    // Get the monorepo root
    const monorepoRoot = path.resolve(projectRoot, '../..');
    
    const config = getDefaultConfig(projectRoot);
    
    // Configure for monorepo
    config.watchFolders = [monorepoRoot];
    config.resolver.nodeModulesPaths = [
      path.resolve(projectRoot, 'node_modules'),
      path.resolve(monorepoRoot, 'node_modules'),
    ];
    
    module.exports = config;