Problem:
I can build the React Native App npx react-native run-android
but when I install react-native-track-player yarn add react-native-track-player
it fails to build.
What I have tried:
npm i react-native-track-player
(it can't be installed I don't know why?(ERESOLVE unable to resolve dependency tree))
System: Ubuntu and i have not installed Watchman
Error:
$ npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 898 file(s) to forward-jetify. Using 4 workers... info JS server already running.
- daemon not running; starting now at tcp:5037
- daemon started successfully info Launching emulator... info Successfully launched emulator. info Installing the app... Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Task :app:checkDebugAarMetadata FAILED 8 actionable tasks: 4 executed, 4 up-to-date Warning: Mapping new ns schemas.android.com/repository/android/common/02 to old ns schemas.android.com/repository/android/common/01 Warning: Mapping new ns schemas.android.com/repository/android/generic/02 to old ns schemas.android.com/repository/android/generic/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/addon2/02 to old ns schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/repository2/02 to old ns schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/sys-img2/02 to old ns schemas.android.com/sdk/android/repo/sys-img2/01 Warning: Mapping new ns schemas.android.com/repository/android/common/02 to old ns schemas.android.com/repository/android/common/01 Warning: Mapping new ns schemas.android.com/repository/android/generic/02 to old ns schemas.android.com/repository/android/generic/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/addon2/02 to old ns schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/repository2/02 to old ns schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/sys-img2/02 to old ns schemas.android.com/sdk/android/repo/sys-img2/01
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find com.google.android.exoplayer:exoplayer-core:2.11.4. Searched in the following locations: - repo.maven.apache.org/maven2/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom - file:/home/maxim/.m2/repository/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom - file:/home/maxim/Desktop/Development/MusicApp/node_modules/react-native/android/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom - file:/home/maxim/Desktop/Development/MusicApp/node_modules/jsc-android/dist/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom - dl.google.com/dl/android/maven2/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom - www.jitpack.io/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom Required by: project :app > project :react-native-track-player
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at help.gradle.org
BUILD FAILED in 18s
error Failed to install the app. Make sure you have the Android development environment set up: reactnative.dev/docs/environment-setup. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 Warning: Mapping new ns schemas.android.com/repository/android/common/02 to old ns schemas.android.com/repository/android/common/01 Warning: Mapping new ns schemas.android.com/repository/android/generic/02 to old ns schemas.android.com/repository/android/generic/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/addon2/02 to old ns schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/sys-img2/02 to old ns schemas.android.com/sdk/android/repo/sys-img2/01 Warning: Mapping new ns schemas.android.com/repository/android/common/02 to old ns schemas.android.com/repository/android/common/01 Warning: Mapping new ns schemas.android.com/repository/android/generic/02 to old ns schemas.android.com/repository/android/generic/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/addon2/02 to old ns schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/repository2/02 to old ns schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns schemas.android.com/sdk/android/repo/sys-img2/02 to old ns schemas.android.com/sdk/android/repo/sys-img2/01
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find com.google.android.exoplayer:exoplayer-core:2.11.4. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom - file:/home/maxim/.m2/repository/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom - file:/home/maxim/Desktop/Development/MusicApp/node_modules/react-native/android/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom - file:/home/maxim/Desktop/Development/MusicApp/node_modules/jsc-android/dist/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom - https://dl.google.com/dl/android/maven2/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom - https://www.jitpack.io/com/google/android/exoplayer/exoplayer-core/2.11.4/exoplayer-core-2.11.4.pom Required by: project :app > project :react-native-track-player
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 18s
at makeError (/home/maxim/Desktop/Development/MusicApp/node_modules/execa/index.js:174:9)
at /home/maxim/Desktop/Development/MusicApp/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/home/maxim/Desktop/Development/MusicApp/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:106:5)
at async Command.handleAction (/home/maxim/Desktop/Development/MusicApp/node_modules/@react-native-community/cli/build/index.js:192:9)
info Run CLI with --verbose flag for more details.