Skip to content

[Help Wanted]: Upgraded project to Expo SDK 53 and Android build failing in with background geolocation not found #2423

@mikeghealth

Description

@mikeghealth

Required Reading

  • Confirmed

Plugin Version

4.18.6

Mobile operating-system(s)

  • iOS
  • Android

Device Manufacturer(s) and Model(s)

Google Pixel

Device operating-systems(s)

Android 15 / 16

React Native / Expo version

Expo 53

What do you require assistance about?

When I run build for Android it is failing, my project had been on Expo 52 and working just fine when building. I am running EAS build commands locally / up in Expo cloud to build the app, so relying on the plugin setup up until now in my app.config.js

Here is the plugin section for my project:
"plugins": [ "react-native-background-fetch", [ "react-native-background-geolocation", { "license": bgGeolocationKey } ], [ "expo-asset" ], [ "expo-gradle-ext-vars", { "googlePlayServiceLocationVersion": "21.1.0", "appCompatVersion": "1.4.2" } ], [ "expo-image-picker", { "photosPermission": "The app accesses your photos to let you upload your avatar.", "cameraPermission": "The app accesses your camera to let you take photos for your avatar." } ], "react-native-background-geolocation", [ "@sentry/react-native/expo", { "url": "https://sentry.io/", "note": "Use SENTRY_AUTH_TOKEN env to authenticate with Sentry.", "project": "react-native", "organization": "saferidehealth" } ], "expo-notifications" ]

Here is my error:

`> Task :react-native-background-geolocation:generateDebugBuildConfig

Task :react-native-background-geolocation:javaPreCompileDebug
Task :react-native-community_netinfo:javaPreCompileDebug
Task :app:processDebugMainManifest
/home/expo/workingdir/build/android/app/src/debug/AndroidManifest.xml:6:5-162 Warning:
application@android:usesCleartextTraffic was tagged at AndroidManifest.xml:6 to replace other declarations but no other declaration present
Task :react-native-community_netinfo:compileDebugJavaWithJavac
Task :react-native-community_netinfo:bundleLibCompileToJarDebug
Task :react-native-safe-area-context:checkKotlinGradlePluginConfigurationErrors SKIPPED
/home/expo/workingdir/build/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java:47: warning: [removal] onCatalystInstanceDestroy() in NativeModule has been deprecated and marked for removal
public void onCatalystInstanceDestroy() {
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 warning
Task :react-native-safe-area-context:generateDebugBuildConfig
Task :app:processDebugManifest
Task :app:processDebugManifestForPackage
Task :react-native-background-geolocation:compileDebugJavaWithJavac
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java:36: error: cannot find symbol
import com.transistorsoft.locationmanager.adapter.TSConfig;
^
symbol: class TSConfig
location: package com.transistorsoft.locationmanager.adapter
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java:38: error: cannot find symbol
import com.transistorsoft.locationmanager.config.TransistorAuthorizationToken;
^
symbol: class TransistorAuthorizationToken
location: package com.transistorsoft.locationmanager.config
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java:39: error: cannot find symbol
import com.transistorsoft.locationmanager.config.TSAuthorization;
^
symbol: class TSAuthorization
location: package com.transistorsoft.locationmanager.config
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:43: error: cannot find symbol
if (name.equals(BackgroundGeolocation.EVENT_TERMINATE)) {
^
symbol: variable EVENT_TERMINATE
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:45: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_LOCATION)) {
^
symbol: variable EVENT_LOCATION
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:51: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_MOTIONCHANGE)) {
^
symbol: variable EVENT_MOTIONCHANGE
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:53: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_HTTP)) {
^
symbol: variable EVENT_HTTP
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:55: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_PROVIDERCHANGE)) {
^
symbol: variable EVENT_PROVIDERCHANGE
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:57: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_ACTIVITYCHANGE)) {
^
symbol: variable EVENT_ACTIVITYCHANGE
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:59: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_SCHEDULE)) {
^
symbol: variable EVENT_SCHEDULE
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:61: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_BOOT)) {
^
symbol: variable EVENT_BOOT
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:63: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_GEOFENCE)) {
^
symbol: variable EVENT_GEOFENCE
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:65: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_GEOFENCESCHANGE)) {
^
symbol: variable EVENT_GEOFENCESCHANGE
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:67: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_HEARTBEAT)) {
^
symbol: variable EVENT_HEARTBEAT
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:69: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_POWERSAVECHANGE)) {
^
symbol: variable EVENT_POWERSAVECHANGE
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:71: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_CONNECTIVITYCHANGE)) {
^
symbol: variable EVENT_CONNECTIVITYCHANGE
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:73: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_ENABLEDCHANGE)) {
^
symbol: variable EVENT_ENABLEDCHANGE
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:75: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_NOTIFICATIONACTION)) {
^
symbol: variable EVENT_NOTIFICATIONACTION
location: class BackgroundGeolocation
/home/expo/workingdir/build/node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java:77: error: cannot find symbol
} else if (name.equals(BackgroundGeolocation.EVENT_AUTHORIZATION)) {
^
`

[Optional] Plugin Code and/or Config

[Optional] Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions