react-native-jw-media-player
react-native-jw-media-player copied to clipboard
react-native 0.73.1 is throwing compileDebugJavaWithJavac FAILED
Task :react-native-jw-media-player:compileDebugJavaWithJavac FAILED
CueMarkerSeekbar seekBar = findViewById(R.id.controlbar_seekbar);
^
symbol: variable id location: class R Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/anilgupta/Documents/maddy/republic-mobileapp/node_modules/react-native-jw-media-player/android/src/main/java/com/appgoalz/rnjwplayer/RNJWPlayerViewManager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
package versions:
"react-native": "^0.73.1", "react": "^18.2.0", "react-native-jw-media-player": "^0.2.40",
Same issue
This is my set up, i thing is because java version maybe i added all the settings from https://docs.jwplayer.com/players/docs/android-add-the-sdk
System: OS: Windows 11 10.0.22631 CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz Memory: 1.03 GB / 7.83 GB Binaries: Node: version: 20.10.0 path: C:\Program Files\nodejs\node.EXE Yarn: version: 1.22.21 path: ~\AppData\Roaming\npm\yarn.CMD npm: version: 10.2.3 path: C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: - "28" - "29" - "31" - "33" - "34" Build Tools: - 29.0.2 - 30.0.2 - 30.0.3 - 31.0.0 - 33.0.0 - 33.0.1 - 34.0.0 System Images: - android-22 | Android TV Intel x86 Atom - android-26 | Android TV Intel x86 Atom - android-26 | Google APIs Intel x86 Atom - android-30 | Google TV Intel x86 Atom - android-34 | Intel x86_64 Atom - android-34 | Google APIs Intel x86_64 Atom Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: AI-223.8836.35.2231.11005911 Visual Studio: - 17.8.34330.188 (Visual Studio Community 2022) Languages: Java: version: 17.0.8 path: C:\Program Files\Microsoft\jdk-17.0.8.7-hotspot\bin\javac.EXE Ruby: Not Found npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: Not Found react-native-tvos: installed: 0.73.1-3 react-native-windows: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: Not found newArchEnabled: Not found
Task :react-native-jw-media-player:compileDebugJavaWithJavac FAILED
CueMarkerSeekbar seekBar = findViewById(R.id.controlbar_seekbar); ^
symbol: variable id location: class R Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/anilgupta/Documents/maddy/republic-mobileapp/node_modules/react-native-jw-media-player/android/src/main/java/com/appgoalz/rnjwplayer/RNJWPlayerViewManager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
package versions:
"react-native": "^0.73.1", "react": "^18.2.0", "react-native-jw-media-player": "^0.2.40",
Did you solved the issue?
@Dav2015 yes we did an temperory fix for this issue.Replace that line before : CueMarkerSeekbar seekBar = findViewById(R.id.controlbar_seekbar); after :CueMarkerSeekbar seekBar = findViewById(com.longtailvideo.jwplayer.R.id.controlbar_seekbar); and do patch package it will work
@ahsanreal4 the code must be changed to RNJWPlayerView.java not here RNJWPlayerViewManager.java as I was not finding any code like that there
@ahsanreal4 the code must be changed to RNJWPlayerView.java not here RNJWPlayerViewManager.java as I was not finding any code like that there
Yes.
@manish-l-au3 Thank you so much. Your solution worked
for anyone else having this issue with Expo SDK 50 you can follow his answer.
for more explanation on how to perform the patch package operation. You can use this article I found on medium https://blog.stackademic.com/optimizing-react-native-a-guide-to-using-patch-package-in-react-react-native-53695f349521
Hello! I was unable to compile the app and now with your fix I was able to solve it but have another issue, does this happen to you?
FATAL EXCEPTION: main
Process: com.rootstrap.driven.dev, PID: 11502
java.lang.SecurityException: com.rootstrap.driven.dev: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.os.Parcel.createExceptionOrNull(Parcel.java:3069)
at android.os.Parcel.createException(Parcel.java:3053)
at android.os.Parcel.readException(Parcel.java:3036)
at android.os.Parcel.readException(Parcel.java:2978)
at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:6137)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1913)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1853)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1841)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:772)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:772)
at com.longtailvideo.jwplayer.m.b.a(SourceFile:227)
at com.jwplayer.a.c.a(SourceFile:1108)
at com.jwplayer.a.c.$r8$lambda$lP2nEPCyYi6Q8O_pk9DldgnjccI(Unknown Source:0)
at com.jwplayer.a.c$$ExternalSyntheticLambda1.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8893)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:16580)
at android.app.IActivityManager$Stub.onTransact$registerReceiverWithFeature$(IActivityManager.java:11530)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2928)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3195)
at android.os.Binder.execTransactInternal(Binder.java:1375)