react-native-video-processing icon indicating copy to clipboard operation
react-native-video-processing copied to clipboard

Task :react-native-video-processing:compileDebugJavaWithJavac FAILED

Open rajyuva1000 opened this issue 2 years ago • 1 comments

Anyone can help on this. i am using reactnative 0.72.4 version

\node_modules\react-native-video-processing\android\src\main\java\com\shahenlibrary\Trimmer\Trimmer.java:377: error: unreported exception IOException; must be caught or declared to be thrown retriever.release(); ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: ....\node_modules\react-native-video-processing\android\src\main\java\com\shahenlibrary\VideoPlayer\VideoPlayerViewManager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error

rajyuva1000 avatar Sep 19 '23 11:09 rajyuva1000

this is something i've run into with upgrading to sdk33. if you use patch-package you can fix by modifying Trimmer.java like so:

replace

retriever.release();

with

try {
        retriever.release();
} catch (Exception e) {
        // TODO: handle exception
}

then run npx patch-package react-native-video-processing

I'm not a Java dev so i have no idea what to do with the exception but hey it works.

there is a PR in here to fix this but I think this is a dead repo so...

ahardy42 avatar Oct 13 '23 22:10 ahardy42