Android build service: error: cannot find symbol SplashScreen, but `eas build --local` works.

SDK: 43 Beta
Platform: Android

I upgraded an old app from SDK 40 to SDK 43 Beta. I’ve never build this app with EAS Build before. Only expo build:android. I thought I’d give it a try. Unfortunately it failed with an error like the following:

> Task :app:compileDebugJavaWithJavac FAILED
[stderr] /build/workingdir/build/android/app/src/main/java/wodin/acted/splice/gadget/fizzy_app/MainActivity.java:3: error: cannot find symbol
[stderr] import expo.modules.splashscreen.SplashScreen;
[stderr]                                 ^
[stderr]   symbol:   class SplashScreen
[stderr]   location: package expo.modules.splashscreen
[stderr] /build/workingdir/build/android/app/src/main/java/wodin/acted/splice/gadget/fizzy_app/MainActivity.java:47: error: cannot find symbol
[stderr]     SplashScreen.show(this, SplashScreenImageResizeMode.CONTAIN, ReactRootView.class, false);
[stderr]     ^
[stderr]   symbol:   variable SplashScreen
[stderr]   location: class wodin.acted.splice.gadget.fizzy_app.MainActivity

I tried building it with eas build --local and that worked!

I can’t figure out why SplashScreen can’t be found on the build servers when it works locally. I have a splash image defined in app.json, but otherwise I have nothing in my code that references SplashScreen.

% expo diagnostics

  Expo CLI 4.12.1 environment info:
    System:
      OS: macOS 11.6
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.10.0 - /opt/homebrew/bin/node
      Yarn: 1.22.15 - /opt/homebrew/bin/yarn
      npm: 7.24.1 - /opt/homebrew/bin/npm
    Managers:
      CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
    IDEs:
      Android Studio: 2020.3 AI-203.7717.56.2031.7678000
      Xcode: 13.0/13A233 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^43.0.0-beta.3 => 43.0.0-beta.3
      react: 17.0.1 => 17.0.1
      react-dom: 17.0.1 => 17.0.1
      react-native: 0.64.2 => 0.64.2
      react-native-web: 0.17.1 => 0.17.1
    Expo Workflow: managed

% jq '.dependencies' <package.json
{
  "@react-native-community/masked-view": "^0.1.11",
  "@react-navigation/native": "^6.0.5",
  "@react-navigation/native-stack": "^6.2.3",
  "expo": "^43.0.0-beta.3",
  "expo-dev-client": "~0.6.0",
  "expo-status-bar": "~1.1.0",
  "expo-updates": "~0.10.2",
  "react": "17.0.1",
  "react-dom": "17.0.1",
  "react-native": "0.64.2",
  "react-native-gesture-handler": "~1.10.2",
  "react-native-paper": "^4.9.2",
  "react-native-reanimated": "~2.2.0",
  "react-native-safe-area-context": "3.3.2",
  "react-native-screens": "~3.8.0",
  "react-native-web": "0.17.1"
}

Build with “default” image:

Build with “latest” image:

Any ideas?

EDIT: I have now cloned the repository on another machine and I am still able to build locally on the other machine.

It would appear something has changed on the build farm since I posted the above.

It is currently working without having made any changes.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.