Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gradle 8 issues #12

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zeevl
Copy link

@zeevl zeevl commented May 19, 2023

Was getting compile issues with RN 0.71, which requires gradle 8.

Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
~/node_modules/@react-native-community/cameraroll/android/src/main/java/com/reactnativecommunity/cameraroll/CameraRollModule.java:650: error: unreported exception IOException; must be caught or declared to be thrown
      retriever.release();
                       ^
~/node_modules/@react-native-community/cameraroll/android/src/main/java/com/reactnativecommunity/cameraroll/CameraRollModule.java:713: error: unreported exception IOException; must be caught or declared to be thrown
          retriever.release();
                           ^
Note: ~/node_modules/@react-native-community/cameraroll/android/src/main/java/com/reactnativecommunity/cameraroll/CameraRollModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

It essentially brings over this PR:
react-native-cameraroll/react-native-cameraroll#419

Also fixes an error that was happening when trying to save videos to android gallery:

Save video error on Android: MIME type video/mp4 cannot be inserted into content://media/external/images/media; expected MIME type under image/*

@@ -152,8 +152,13 @@ protected void doInBackgroundGuarded(Void... params) {
mediaDetails.put(Images.Media.DISPLAY_NAME, source.getName());
mediaDetails.put(Images.Media.IS_PENDING, 1);
ContentResolver resolver = mContext.getContentResolver();
Uri mediaContentUri = resolver
.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, mediaDetails);
// Uri mediaContentUri = resolver
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you remove commented code, then we can merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants