Required Reading
Plugin Version
5.0.0
Mobile operating-system(s)
Device Manufacturer(s) and Model(s)
Simulator
Device operating-systems(s)
Android
React Native / Expo version
Expo 54
What happened?
Android seems to be failing to build using latest 5.0 version.
Plugin Code and/or Config
BackgroundGeolocation.ready({
geolocation: {
desiredAccuracy: BackgroundGeolocation.DesiredAccuracy.High,
// distanceFilter: 10,
// Activity Recognition
stopTimeout: 5,
distanceFilter: 10,
},
app: {
stopOnTerminate: false, // <-- Allow the background-service to continue tracking when user closes the app.
startOnBoot: true, // <-- Auto start tracking when device is powered-up.
},
http: {
autoSync: true,
url: 'https://background-geolocation-console.---/locations',
},
logger: {
logLevel: BackgroundGeolocation.LogLevel.Verbose,
debug: false, // <-- enable this hear sounds for background-geolocation life-cycle.
},
}).then((state) => {
console.log('- BackgroundGeolocation is configured and ready: ', state.enabled);
});
Relevant log output
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-background-geolocation:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler output below.
Note: Recompile with -Xlint:deprecation for details.
/Users/.../node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTaskManager.java:164: error: cannot access Logger
TSLog.logger.debug("[onHeadlessJsTaskFinish] taskId: " + taskId);
^
class file for org.slf4j.Logger not found
Note: /Users/.../node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
/Users/.../node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java:1280: warning: [removal] onCatalystInstanceDestroy() in NativeModule has been deprecated and marked for removal
public void onCatalystInstanceDestroy() {
^
/Users/..../node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java:369: error: cannot find symbol
TSLog.w(TSLog.warn("#ready already called. Redirecting to #setConfig"));
^
symbol: method w(String)
location: class TSLog
/Users/.../node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java:372: error: cannot find symbol
TSLog.w(TSLog.warn("#ready already called. Ignored config since reset: false"));
^
symbol: method w(String)
location: class TSLog
/Users/.../node_modules/react-native-background-geolocation/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java:806: error: cannot find symbol
TSLog.e(TSLog.warn(message));
^
symbol: method e(String)
location: class TSLog
4 errors
1 warning
Required Reading
Plugin Version
5.0.0
Mobile operating-system(s)
Device Manufacturer(s) and Model(s)
Simulator
Device operating-systems(s)
Android
React Native / Expo version
Expo 54
What happened?
Android seems to be failing to build using latest 5.0 version.
Plugin Code and/or Config
Relevant log output