react-native-background-geolocation
react-native-background-geolocation copied to clipboard
app crash on BackgroundGeolocation.start()
Your Environment
- Plugin version:
- Platform: iOS or Android
- OS version:
- Device manufacturer and model:
- Running in Simulator:
- React Native version:
- Plugin configuration options:
- Link to your project:
Context
Expected Behavior
Actual Behavior
Possible Fix
Steps to Reproduce
Context
Debug logs
Same here, with no error displayed anywhere. Just crashing.
having thesame problem here. when I comment out "BackgroundGeolocation.start()", the app builds well without crashing but when I make the method active, the app crashes. Anyone found a working solution?
Seems like the crash stoped when I removed the package react-native-permissions
, but I'm not 100% sure.
So After debugging the issue I found adding these two things to your. android/app/build.gradle solves the issues implementation com.google.android.gms:play-services-gcm:15.0.1 implementation com.google.android.gms:play-services-location:15.0.1
So After debugging the issue I found adding these two things to your. android/app/build.gradle solves the issues implementation com.google.android.gms:play-services-gcm:15.0.1 implementation com.google.android.gms:play-services-location:15.0.1
this worked for me, thanks @kabhimanyu
So After debugging the issue I found adding these two things to your. android/app/build.gradle solves the issues implementation com.google.android.gms:play-services-gcm:15.0.1 implementation com.google.android.gms:play-services-location:15.0.1
Thank you, brother. You saved my life.
So After debugging the issue I found adding these two things to your. android/app/build.gradle solves the issues implementation com.google.android.gms:play-services-gcm:15.0.1 implementation com.google.android.gms:play-services-location:15.0.1
This does not resolve my issue. any other resolve which might help
So After debugging the issue I found adding these two things to your. android/app/build.gradle solves the issues implementation com.google.android.gms:play-services-gcm:15.0.1 implementation com.google.android.gms:play-services-location:15.0.1
Thank you
So After debugging the issue I found adding these two things to your. android/app/build.gradle solves the issues implementation com.google.android.gms:play-services-gcm:15.0.1 implementation com.google.android.gms:play-services-location:15.0.1
Want say thanks for that comment. and I also want add some notes for that issue. After adding that 2 lines i received next error.
"didn't find class androidx.localbroadcastmanager.content.localbroadcastmanager on path ...."
Few hours of research on internet and I found additional 2 implementation which help fix that issue:
implementation "androidx.legacy:legacy-support-v4:1.0.0" implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0" ----UPD ---- "react": "16.13.1", "react-native": "0.63.2", "@mauron85/react-native-background-geolocation": "0.6.3",
@IhorReactNative I'm using the same lib versions as yours, but it keep crashing on my device. In the simulator is working fine though.
Facing an app crash also when BackgroundGeolocation.start() is called. I added all four dependencies and facing the same issue implementation com.google.android.gms:play-services-gcm:15.0.1 implementation com.google.android.gms:play-services-location:15.0.1 implementation "androidx.legacy:legacy-support-v4:1.0.0" implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0"
"react": "16.9.0", "react-native": "0.61.2", "@mauron85/react-native-background-geolocation": "^0.6.3",
I was able to fix this issue by just adding implementation "androidx.legacy:legacy-support-v4:1.0.0"
into the dependency list
I was able to fix this issue by just adding
implementation "androidx.legacy:legacy-support-v4:1.0.0"
into the dependency list
Can you please share the contents of your build.gradle
?
So After debugging the issue I found adding these two things to your. android/app/build.gradle solves the issues implementation com.google.android.gms:play-services-gcm:15.0.1 implementation com.google.android.gms:play-services-location:15.0.1
u save my life