System:
OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Memory: 642.73 MB / 7.66 GB
Shell: 5.5.1 - /usr/bin/zsh
Binaries:
Node: 10.16.3 - /usr/bin/node
Yarn: 1.19.0 - /usr/bin/yarn
npm: 6.9.0 - /usr/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 27, 28
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
"react-native-track-player": "^1.1.8",
I did the installation procedure but the app does not open. Close and alert spodcast keeps stopping.
./android/settings.gradle :
rootProject.name = 'spodcast'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':react-native-track-player'
project(':react-native-track-player').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-track-player/android')
include ':app
./android/app/build.gradle :
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
compile project(':react-native-track-player')
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}
saga :
//playerSaga.js
import {call, put} from 'redux-saga'
import TrackPlayer from 'react-native-track-player'
import PlayerActions from '~/store/ducks/player'
export function* init() {
yield call(TrackPlayer.setupPlayer)
TrackPlayer.addEventListener('playback-track-changed', () => {})
TrackPlayer.addEventListener('playback-state', () => {})
}
export function* setPodcast({podcast}) {
yield call(TrackPlayer.add(podcast.tracks))
yield put(PlayerActions.setPodcastSuccess(podcast))
yield TrackPlayer.play()
}
//rootSaga.js :
import {all, takeLatest} from 'redux-saga/effects'
import {PodcastsTypes} from '~/store/ducks/podcasts'
import {PlayerTypes} from '~/store/ducks/player'
import getPodcasts from './podcastsSaga'
import {init, setPodcast} from './playerSaga'
function* rootSaga() {
return yield all([
init(),
takeLatest(PodcastsTypes.REQUEST_PODCASTS, getPodcasts),
takeLatest(PlayerTypes.SET_PODCAST, setPodcast)
])
}
export default rootSaga
I have the same issue. I just installed the react-native-track-player an in IOS the app starts fine while in android keeps stopping
I have the same problem with react-native-track-player 2.0.0-rc13
I have the same issue.
any solution for this?
I have the same issue, android crashing. Does not even start.
Did you guys solve it? I have to release it in 2 days as on emulator it working more than perfectly. And now I have created a release build. And It is not working now. My client is calling again and again.
Does anyone have any crash error logs to share?
@curiousdustin Invariant Violation: Module AppRegistry is not a registered callable module ERROR is showing.
I tried to remove everything related to RN Track Player and just added this import in the index.js and found that just adding this import crash my app on startup.
import TrackPlayer from 'react-native-track-player';
I'm using
"react-native": "0.62.2"
"react-native-track-player": "^1.2.3"
Do you happen to be using any other audio/video related modules?
Most helpful comment
I have the same issue. I just installed the react-native-track-player an in IOS the app starts fine while in android keeps stopping