React-native-track-player: undefined is not an object (evaluating 'TrackPlayer.STATE_NONE')

Created on 10 Sep 2018  路  4Comments  路  Source: react-native-kit/react-native-track-player

Hello!

I can not make this library work in any way... I have observed this entry #102 and #96 , but I can not get it to work ... I have tried modifying the files ios/RNTrackPlayer/RNTrackPlayer.swift, I have tried installing "npm uninstall --save react-native-kit/react-native-track-player#dev ".

The error appears just by importing the library into any project screen

At the moment I've only tried on ios

captura de pantalla 2018-09-10 a les 17 07 01

react-native-cli: 2.0.1
react-native: 0.56.0

npm --v
6.2.0

I'm desperate, thanks

Most helpful comment

@mckmarc IOS User
Go to project navigator -> click right button on project name -> click New File -> than select Swift file -> give file name like dummy.swift -> Clean & Run

All 4 comments

getting the same error on android

react-native: 0.54
react-native-track-player: 0.2.4

@mckmarc IOS User
Go to project navigator -> click right button on project name -> click New File -> than select Swift file -> give file name like dummy.swift -> Clean & Run

You forgot to link native library.

Looks like a linking problem. Try removing the library, adding it again and linking it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ManrickCapotolan picture ManrickCapotolan  路  4Comments

b3rkaydem1r picture b3rkaydem1r  路  3Comments

toooldmohammad picture toooldmohammad  路  3Comments

amed picture amed  路  4Comments

moduval picture moduval  路  3Comments