shahen94 / react-native-video-processing

Native Video editing/trimming/compressing :movie_camera: library for React-Native
https://shahen94.github.io/react-native-video-processing/
MIT License
1.24k stars 321 forks source link

can't install it on RN-0.69 #371

Open siddharth-kt opened 1 year ago

siddharth-kt commented 1 year ago

Hi @shahen94

Current Behavior

Compilation error

LOG...

If i add jcenter() then another error occurs. LOG...

Task :react-native-video-processing:compileDebugJavaWithJavac

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness. Please consult deprecation warnings for more details. 608 actionable tasks: 24 executed, 584 up-to-date C:...\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: C:...\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

FAILURE: Build failed with an exception.

Expected Behavior

It should compile successfully.

Your Environment

software version
react-native-video-processing ^2.0.0
react-native 0.69.5
node v14.17.0
jamesdunay commented 1 year ago

Having same issue, anyone know of a fix?

Parkjunwu commented 1 year ago

Same issue on android with react-native 0.70.1 and 0.70.4.

Could not determine the dependencies of task ':app:processDebugResources'. Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. Could not find com.yqritc:android-scalablevideoview:1.0.4. Searched in the following locations:

On ios it works well. Only android doesn't work.

swadique commented 1 year ago

Solution: Replace all retriever.release(); in react-native-video-processing/android/src/main/java/com/shahenlibrary/Trimmer/Trimmer.java with

try {
  retriever.release();
} catch (IOException ex) {
  // handle the exception here
}
peyman-hakemi commented 1 year ago

@swadique any solution on this?

im getting this error when I replaceed all retriever.release();

node_modules\react-native-video-processing\android\src\main\java\com\shahenlibrary\Trimmer\Trimmer.java:237: error: exception IOException is never thrown in body of corresponding try statement } catch(IOException e) { ^

ahardy42 commented 1 year ago

@peyman-hakemi if you're still having that issue, I was as well and although I don't know what I'm doing with Java... this seems to have fixed the compile issue:

try {
    retriever.release();
} catch (Exception e) {
    e.printStackTrace();
}