chaimPaneth / react-native-jw-media-player

React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
MIT License
197 stars 92 forks source link

react-native 0.73.1 is throwing compileDebugJavaWithJavac FAILED #334

Open manish-l-au3 opened 11 months ago

manish-l-au3 commented 11 months ago

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",

Dav2015 commented 10 months ago

Same issue

Dav2015 commented 10 months ago

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:

Dav2015 commented 10 months ago

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?

manish-l-au3 commented 10 months ago

@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

sidorelamerkaj commented 9 months ago

@ahsanreal4 the code must be changed to RNJWPlayerView.java not here RNJWPlayerViewManager.java as I was not finding any code like that there

ahsanreal4 commented 9 months ago

@ahsanreal4 the code must be changed to RNJWPlayerView.java not here RNJWPlayerViewManager.java as I was not finding any code like that there

Yes.

holladortun commented 7 months ago

@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

fernandatoledo commented 7 months ago

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)