transistorsoft / rn-background-geolocation-demo

Demo app for react-native-background-geolocation plugin
MIT License
203 stars 111 forks source link

Demo app not working #139

Open ShivalThakur opened 1 week ago

ShivalThakur commented 1 week ago

Hi, When I try to run the app. It is getting crashed on startup. Logcat has the following logs.

image Can you please help on this.

Thanks

christocracy commented 1 week ago

I've just pushed a commit to master. I suggest you re-clone the demo repo and start from scratch.

What device and OS are you installing this on?

ShivalThakur commented 4 days ago

Hi, I tried the latest code, but it does not work. I am installing it on Android emulator and Android 14. Both has the same issue.

christocracy commented 4 days ago

Execute the following task:

$ cd android
$ ./gradlew app:dependencies

Capture all the output and paste into a text file. Attach the file here.

ShivalThakur commented 3 days ago

Please find the attached output logs.txt

christocracy commented 3 days ago

Have you made any modifications to the code after cloning this repo?

christocracy commented 3 days ago
ShivalThakur commented 1 day ago
  • re you running this in a simulator?
  • What is your development machine's OS (Windows? Mac? Linux?)

I am trying it on both simulator and real device. My development machine is Windows.

christocracy commented 1 day ago

Have you made any modifications to the code after cloning this repo?

ShivalThakur commented 1 day ago

Have you made any modifications to the code after cloning this repo?

Yes I had changes, as app was throwing some errors. image

christocracy commented 1 day ago

Do not modify the code. Remove those changes! If there’s an error, send that to me.

ShivalThakur commented 1 day ago

I cloned it. Getting build failure. image

christocracy commented 1 day ago

I just generated a fresh new HelloWorld app.

package.json:

"dependencies": {
    "react": "18.3.1",
    "react-native": "0.75.3"
  },

android/app/build.gradle

dependencies {
    // The version of react-native is set by the React Native Gradle Plugin
    implementation("com.facebook.react:react-android")

    if (hermesEnabled.toBoolean()) {
        implementation("com.facebook.react:hermes-android")
    } else {
        implementation jscFlavor
    }
}

As for your error "Could not move temporary workspace - Error resolving plugin [id: 'com.facebook.react.settings'] - java.io.UncheckedIOException", this seems to be a Windows issue. See if you can solve your problem (without modifying the demo app code) by following this thread:

christocracy commented 1 day ago

From that thread, the RN folks have acknowledged a Windows issue with Gradle > 8.6:

Screenshot 2024-09-30 at 10 28 46 AM (1)

Try the solution here. Let me know if it works and I'll downgrade to Gradle 8.6.