jamesisaac / react-native-background-task

Periodic background tasks for React Native apps, cross-platform (iOS and Android), which run even when the app is closed.
MIT License
1.1k stars 110 forks source link

Undefined is not an object #30

Open ejdzipi opened 6 years ago

ejdzipi commented 6 years ago

Hello, I just started experimenting with this android background tasks, but i was not able to run even simple example.

screenshot_20180406-151055

I have started with create-react-native-app, ejected from expo, added react-native-background-task, linked, updated MainApplication.java and tried to implement Simple example from this project's readme. After running the app, i got this error. I want this to run just on android, so i did not install react-native-background-fetch.

My package versions: "react": "16.3.0-alpha.1", "react-native": "0.54.0", "react-native-background-task": "^0.2.1", "react-navigation": "^1.5.11"

Any clue about how to fix this? Thanks.

giuliogatto commented 6 years ago

Same problem here, did you find a solution? thanks

ivan-branets commented 6 years ago

It seems react-native link should help. At least it worked for me.

ejdzipi commented 6 years ago

@ivan-branets sadly, it didn't help @jamesisaac any fix for this? thanks

terrynguyen255 commented 3 years ago

Linking does not work for me neither