souvik-ghosh / react-native-create-thumbnail

iOS/Android thumbnail generator with support for both local and remote videos
MIT License
246 stars 105 forks source link

Unable to compile for Android 13 (Android SDK v.33) #69

Closed kakato10 closed 2 years ago

kakato10 commented 2 years ago

Describe the bug Unable to compile react-native-create-thumbnail for Android SDK v.33 Tiramisu (Android 13).

To Reproduce Steps to reproduce the behaviour:

  1. Create a React Native project
  2. Add react-native-create-thumbnail
  3. Ensure Gradle JDK 11 and Android SDK 33 are installed on the machine that's gonna be used for the build
  4. Trigger app build with the following settings in build.gradle:
        compileSdkVersion = 33
        targetSdkVersion = 33

Version react-native-create-thumbnail 1.5.1

Expected Results Successful app build

Actual Result The following compilation error appears:

<project-path>/node_modules/react-native-create-thumbnail/android/src/main/java/com/createthumbnail/CreateThumbnailModule.java:192: error: unreported exception IOException; must be caught or declared to be thrown
        retriever.release();
                         ^
timoteialbu commented 2 years ago

Would love to hear a resolution on this as well!

souvik-ghosh commented 2 years ago

fixed in v1.6.0

tech247gb commented 1 year ago

Still remains compile issues in ANDROID Does not fixed in v1.6.0

Task :react-native-create-thumbnail:compileDebugJavaWithJavac FAILED 518 actionable tasks: 4 executed, 514 up-to-date l/-reactnative-main/node_modules/react-native-create-thumbnail/android/src/main/java/com/createthumbnail/CreateThumbnailModule.java:194: error: exception IOException is never thrown in body of corresponding try statement } catch(IOException e) { ^ Note: /-reactnative-main/node_modules/react-native-create-thumbnail/android/src/main/java/com/createthumbnail/CreateThumbnailModule.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /****-reactnative-main/node_modules/react-native-create-thumbnail/android/src/main/java/com/createthumbnail/CreateThumbnailModule.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error

FAILURE: Build failed with an exception.

nitishkumar325 commented 1 year ago

any update over this

nitishkumar325 commented 1 year ago

try { retriever.release(); } catch (IOException e) { throw new IllegalStateException("File doesn't exist or not supported"); } i got the solution just warp this inside try-catch

souvik-ghosh commented 1 year ago

try { retriever.release(); } catch (IOException e) { throw new IllegalStateException("File doesn't exist or not supported"); } i got the solution just warp this inside try-catch

@nitishkumar325, This was added in v2.0.0-rc.2. Please use it if you're on android 13 (SDK v33)

Parmar-Bansi commented 12 months ago

same error yet!!

please provide proper solutions..