react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

:@hariks789_react-native-background-geolocation-common:compileReleaseJavaWithJavac'. > Compilation failed; see the compiler error output for details.

Open Nirmal-cod opened this issue 2 years ago • 7 comments

Your Environment

buildToolsVersion = "33.0.0" minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33

  • Plugin version:
  • Platform: iOS or Android
  • OS version:
  • Device manufacturer and model: mac M1
  • Running in Simulator:
  • React Native version:0.72.4
  • Plugin configuration options:
  • Link to your project:

Context

:@hariks789_react-native-background-geolocation-common:compileReleaseJavaWithJavac'. > Compilation failed; see the compiler error output for details. got this error..

Expected Behavior

wanted to build app

Actual Behavior

problem in build

Possible Fix

Steps to Reproduce

Context

Debug logs

Nirmal-cod avatar Sep 12 '23 08:09 Nirmal-cod

Task :hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars FAILED

FAILURE: Build failed with an exception.

  • What went wrong: A problem was found with the configuration of task ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' (type 'LibraryJniLibsTask').
    • Gradle detected a problem with the following location: '/Users/nirmal/rioapp/node_modules/@hariks789/react-native-background-geolocation/android/lib/build/intermediates/stripped_native_libs/release/out'.

      Reason: Task ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' uses this output of task ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

      Possible solutions:

      1. Declare task ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' as an input of ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars'.
      2. Declare an explicit dependency on ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' from ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' using Task#dependsOn.
      3. Declare an explicit dependency on ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' from ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' using Task#mustRunAfter

Nirmal-cod avatar Sep 13 '23 06:09 Nirmal-cod

@hariks789

Nirmal-cod avatar Sep 13 '23 07:09 Nirmal-cod

Task :hariks789_react-native-background-geolocation:packageDebugResources FAILED

Nirmal-cod avatar Sep 13 '23 11:09 Nirmal-cod

same, @Nirmal-cod you fixed??

lahed avatar Dec 07 '23 02:12 lahed

@Nirmal-cod @lahed Sorry, I am no longer maintaining the package. We started using the paid package for the app.

This fork from @mak12 might help you guys https://github.com/mak12/react-native-background-geolocation

hariks789 avatar Dec 07 '23 07:12 hariks789

Task :hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars FAILED

FAILURE: Build failed with an exception.

  • What went wrong: A problem was found with the configuration of task ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' (type 'LibraryJniLibsTask').

    • Gradle detected a problem with the following location: '/Users/nirmal/rioapp/node_modules/@hariks789/react-native-background-geolocation/android/lib/build/intermediates/stripped_native_libs/release/out'. Reason: Task ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' uses this output of task ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Possible solutions:

      1. Declare task ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' as an input of ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars'.
      2. Declare an explicit dependency on ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' from ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' using Task#dependsOn.
      3. Declare an explicit dependency on ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' from ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' using Task#mustRunAfter

I think your settings.gradle file like this.

include ':@hariks789_react-native-background-geolocation-common' project(':@hariks789_react-native-background-geolocation-common').projectDir = new File(rootProject.projectDir, '../node_modules/@hariks789/react-native-background-geolocation/android/common') include ':@hariks789_react-native-background-geolocation' project(':@hariks789_react-native-background-geolocation').projectDir = new File(rootProject.projectDir, '../node_modules/@hariks789/react-native-background-geolocation/android/lib')

Remove the two lines .

include ':@hariks789_react-native-background-geolocation' project(':@hariks789_react-native-background-geolocation').projectDir = new File(rootProject.projectDir, '../node_modules/@hariks789/react-native-background-geolocation/android/lib')

Use this line only. It is working

include ':@hariks789_react-native-background-geolocation-common' project(':@hariks789_react-native-background-geolocation-common').projectDir = new File(rootProject.projectDir, '../node_modules/@hariks789/react-native-background-geolocation/android/common')

But we using alternate package. That package also I got same error. After remove the lines working fine.

https://www.npmjs.com/package/@drewaker/react-native-background-geolocation

mohanrajrajamani avatar May 22 '24 13:05 mohanrajrajamani

Task :hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars FAILED

FAILURE: Build failed with an exception.

  • What went wrong: A problem was found with the configuration of task ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' (type 'LibraryJniLibsTask').

    • Gradle detected a problem with the following location: '/Users/nirmal/rioapp/node_modules/@hariks789/react-native-background-geolocation/android/lib/build/intermediates/stripped_native_libs/release/out'. Reason: Task ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' uses this output of task ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Possible solutions:

      1. Declare task ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' as an input of ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars'.
      2. Declare an explicit dependency on ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' from ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' using Task#dependsOn.
      3. Declare an explicit dependency on ':@hariks789_react-native-background-geolocation:stripReleaseDebugSymbols' from ':hariks789_react-native-background-geolocation:copyReleaseJniLibsProjectAndLocalJars' using Task#mustRunAfter

I think your settings.gradle file like this.

include ':@hariks789_react-native-background-geolocation-common' project(':@hariks789_react-native-background-geolocation-common').projectDir = new File(rootProject.projectDir, '../node_modules/@hariks789/react-native-background-geolocation/android/common') include ':@hariks789_react-native-background-geolocation' project(':@hariks789_react-native-background-geolocation').projectDir = new File(rootProject.projectDir, '../node_modules/@hariks789/react-native-background-geolocation/android/lib')

Remove the two lines .

include ':@hariks789_react-native-background-geolocation' project(':@hariks789_react-native-background-geolocation').projectDir = new File(rootProject.projectDir, '../node_modules/@hariks789/react-native-background-geolocation/android/lib')

Use this line only. It is working

include ':@hariks789_react-native-background-geolocation-common' project(':@hariks789_react-native-background-geolocation-common').projectDir = new File(rootProject.projectDir, '../node_modules/@hariks789/react-native-background-geolocation/android/common')

But we using alternate package. That package also I got same error. After remove the lines working fine.

https://www.npmjs.com/package/@drewaker/react-native-background-geolocation

Thanks

You saved my time

  include ':@mauron85_react-native-background-geolocation-common'
  project(':@mauron85_react-native-background-geolocation-common').projectDir = new File(rootProject.projectDir, '../node_modules/@mauron85/react-native-background-geolocation/android/common')

worked for me

Inayat567 avatar May 26 '24 18:05 Inayat567