Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

React-Native-Crop-Image doesn't work on android , How to crop images on android and it should be same for ios also

$
0
0

I have tried this library react-native-image-crop-picker as suggested on this stackoverflow answer

I have followed each and every step mentioned here

  1. Run npm i react-native-image-crop-picker@0.4.2
  2. import ImagePicker from 'react-native-image-crop-picker';then

ImagePicker.openPicker({width: 300,height: 400,cropping: true}).then(image => {console.log(image);});

Also in // file: android/settings.gradle have added the below code

include ':react-native-image-crop-picker'project(':react-native-image-crop-picker').projectDir = newFile(settingsDir,'../node_modules/react-native-image-crop-picker/android')

Also as mentioned in the documentation have added required code in build.gradle& MainActivity.java file

But this is not working for me on Android but working perfectly on iOS . On Android I have given to crop images by scale type only not as flexible crop.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>