Skip to content
This repository was archived by the owner on Oct 6, 2022. It is now read-only.

RN-music-control import error. #339

Closed
1 of 3 tasks
Danil-Dorokhin opened this issue Jul 24, 2020 · 2 comments
Closed
1 of 3 tasks

RN-music-control import error. #339

Danil-Dorokhin opened this issue Jul 24, 2020 · 2 comments

Comments

@Danil-Dorokhin
Copy link

Description

I initialized my app with expo, and when i imported rn-music-control it throw me this error:
TypeError: null is not an object ( evaluating 'NativeMusicControl.STATE_PLAYING' )
i tried to link it, but it didnt help so i ejected expo and then tried to link it with 'react-native link', when it didnt help i linked it manualy but it didnt work too.
this is from my react-native info if it can help :

IDEs:
Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6514223
Languages:
Java: 1.8.0_211
Python: 3.8.4
npmPackages:
@react-native-community/cli: ^4.10.1 => 4.10.1
react: ~16.11.0 => 16.11.0
react-native: ~0.62.2 => 0.62.2

  1. Platform ?

    • iOS
    • Android
  1. Device
  • Simulator
  • [ x] Real device
@wassimbrsimo
Copy link

I faced the same issue ,I've managed to fix it using :
npm install react-native-music-control
./gradlew clean
react-native run-android

@Danil-Dorokhin
Copy link
Author

Thanks, it helped

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants