mak12 / react-native-background-geolocation

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

getting error when running npx react-native run-android #3

Open thtRajasthaniGuy opened 1 year ago

thtRajasthaniGuy commented 1 year ago

when running the react-native command it's through error, did clean gradle.

Your Environment

Context

its through error

Expected Behavior

its should run the app.

Actual Behavior

error from terminal: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not find ::. Required by: project :app

Steps to Reproduce

  1. install the library
  2. follow the documentation
  3. run the npx react-native run-android

Setting.gradle file code

                        rootProject.name = 'project name'
                       apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); 
                       applyNativeModulesSettingsGradle(settings)
                       include ':app'
                       includeBuild('../node_modules/react-native-gradle-plugin')

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

                    if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
                   include(":ReactAndroid")
                  project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
                 include(":ReactAndroid:hermes-engine")
                 project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes- 
                engine')
                 }

  build.gradle file code

 dependencies {
            implementation (':@mak12_react-native-background-geolocation')
         }
mak12 commented 9 months ago

Hi can you share stack trace from android studio? @thtRajasthaniGuy

Linuhusainnk commented 8 months ago

Same issue any solution

RN : 0.72.4