mauron85 / react-native-background-geolocation

Background and foreground geolocation plugin for React Native. Tracks user when app is running in background.
Apache License 2.0
1.33k stars 559 forks source link

Build Failed while using this package. Sometimes it works fine but sometime the build fails #564

Open venomkage opened 2 years ago

venomkage commented 2 years ago

Your Environment

Context

Task :@mauron85_react-native-background-geolocation:generateDebugRFile FAILED Execution optimizations have been disabled for task ':@mauron85_react-native-background-geolocation:generateDebugRFile' to ensure correctness due to the following reasons:

  • Gradle detected a problem with the following location: '/Users/username/Documents/Folder/Project/node_modules/@mauron85/react-native-background-geolocation/android/lib/build/intermediates/local_only_symbol_list/debug/R-def.txt'. Reason: Task ':@mauron85_react-native-background-geolocation:generateDebugRFile' uses this output of task ':mauron85_react-native-background-geolocation:parseDebugLocalResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  • Gradle detected a problem with the following location: '/Users/username/Documents/Folder/Project/node_modules/@mauron85/react-native-background-geolocation/android/lib/build/intermediates/packaged_manifests/debug'. Reason: Task ':@mauron85_react-native-background-geolocation:generateDebugRFile' uses this output of task ':mauron85_react-native-background-geolocation:processDebugManifest' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

Expected Behavior

Should run properly

Actual Behavior

The error given above and

Execution failed for task ':@mauron85_react-native-background-geolocation:generateDebugRFile'.

A failure occurred while executing com.android.build.gradle.internal.res.GenerateLibraryRFileTask$GenerateLibRFileRunnable /Users/username/Documents/Folder/Project/node_modules/@mauron85/react-native-background-geolocation/android/lib/build/intermediates/local_only_symbol_list/debug/R-def.txt

Possible Fix

Steps to Reproduce

1. 2. 3. 4.

Context

Debug logs

PartitionPixel commented 2 years ago

I have the exact same error. Bump !

omg9800 commented 1 year ago

I have also same error, How to fix this?

Gradle detected a problem with the following location: '/home/omg9800/Desktop/Capri/frontend/consumer_app_client-merged (2) (1)/consumer_app_client-merged/node_modules/@mauron85/react-native-background-geolocation/android/lib/build/intermediates/shader_assets/debug/out'. Reason: Task ':mauron85_react-native-background-geolocation:packageDebugAssets' uses this output of task ':@mauron85_react-native-background-geolocation:compileDebugShaders' without declaring an explicit or implicit dependenc

arunzn commented 1 year ago

Me too

adewalebanjo commented 1 year ago

By upgrading the values of: `

def DEFAULT_COMPILE_SDK_VERSION = 33 def DEFAULT_BUILD_TOOLS_VERSION = "30.0.3" def DEFAULT_TARGET_SDK_VERSION = 33 def DEFAULT_MIN_SDK_VERSION = 21

`

of the library in the node modules (react-native-background-geolocation/android/common/VERSIONS.gradle) file to match that of my project in android/build.gradle, the error seems to disappear.