darron1217 / react-native-background-geolocation

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

Cannot install on 0.73.4 #30

Open danielzzz opened 8 months ago

danielzzz commented 8 months ago

Hello, I am trying to install in in a new project but it won't compile.

any idea of how to configure this? not very proficient in java to dig into it

thanks in advance! dan

Your Environment

Context

trying to add it to a new project

Expected Behavior

it would compile at least

Actual Behavior

./gradlew assembleRelease

> Configure project :
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
Path for java installation '/usr/lib/jvm/openjdk-11' (Common Linux Locations) does not contain a java executable

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'full_path/node_modules/@darron1217/react-native-background-geolocation/android/lib/build.gradle' line: 29

* What went wrong:
A problem occurred evaluating project ':darron1217_react-native-background-geolocation'.
> Could not read script 'full_path/node_modules/@darron1217/react-native-background-geolocation/android/common/VERSIONS.gradle' as it does not exist.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':darron1217_react-native-background-geolocation'.
> compileSdkVersion is not specified. Please add it to build.gradle

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

BUILD FAILED in 2s

Steps to Reproduce

  1. install
  2. cd android; ./gradlew assembleRelease
karol-maciaszek commented 6 months ago

@danielzzz here is a workaround that may help you:

git clone https://github.com/darron1217/background-geolocation-android node_modules/@darron1217/react-native-background-geolocation/android/common