I entered the following commands in the powershell in the folder containing my alarm app:
npm install react-native-track-player
react-native link react-native-track-player
react-native link seemed to have done nothing, so I manually linked the module following the steps given from the module info.
However, when I include the following line in one of my .js components:
import TrackPlayer from 'react-native-track-player'
I get the following error on my Android device:
TypeError: null is not an object (evaluating 'TrackPlayer.STATE_NONE')
How can I fix this?
Versions:
- react-native-cli: 2.0.1
- react-native: 0.61.5
Here are some screenshots of the stack trace:
RN
0.61.5
has autolinking so you don't need to link it manually.First, try to unlink
If you are developing for ios
Then try to run your project again