Closed jakeee51 closed 2 years ago
Figured it out. The underlying issue was that the package wasn't linking properly and taking in to account the necessary changes to the AndroidManifest.xml
that this package needs to run.
The key is to run expo run:android
for those of you using Expo Go. Or manually re-build your project in Android Studio. You'll have to add a local.properties
file in your android directory which contains the property and value of your android sdk.dir
path (i.e.: sdk.dir=C\:\\%LOCALAPPDATA%\\AppData\\Local\\Android\\Sdk
). After that you may allow your project through your antivirus and resolve a few bugs you see in the CLI after attempting to build.
Same issue here TypeError: null is not an object (evaluating '_RNBackgroundActionsModule.RNBackgroundActions.start')
The only solution that worked for me was to run the following command from the "Using React Native < 0.60" section on the "Install" tutorial (even though i am using react native 0.63.2 which is greater than 0.60)
👉 yarn react-native link react-native-background-actions
It was definitely an autolinking problem because after that there were no errors. Before reaching that solution i also tried adding and removing the dependency, deleting node_modules folder, cleaning gradle and rebuilding the project with android studio but none of these worked for me. Hope this helps someone.
Hey, would like to re-open this issue. Am getting this same error on this library's version 2.6.5. Please see the error logs below that I received using the example code in your repo:
I've looked at issues #21 #34, and #75. Added, removed dependencies, deleted
node_modules
and rebuilt project to no avail. All I wana do is run a simple mobile app in the background.Originally posted by @jakeee51 in https://github.com/Rapsssito/react-native-background-actions/issues/21#issuecomment-1043862753