Michaelvilleneuve / react-native-perspective-image-cropper

Perform custom crop, resizing and perspective correction šŸ“šŸ–¼
MIT License
305 stars 128 forks source link

error: cannot find symbol import org.opencv.RNCustomCropPackage; #47

Open shahzaibali-code opened 4 years ago

shahzaibali-code commented 4 years ago

C:\Users\Home\Desktop\react native2\cropapp\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:19: error: cannot find symbol import org.opencv.RNCustomCropPackage; ^ symbol: class RNCustomCropPackage location: package org.opencv C:\Users\Home\Desktop\react native2\cropapp\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:69: error: cannot find symbol new RNCustomCropPackage(), ^ symbol: class RNCustomCropPackage location: class PackageList Note: C:\Users\Home\Desktop\react native2\cropapp\android\app\src\debug\java\com\cropapp\ReactNativeFlipper.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors

BUILD FAILED in 16s

at makeError (C:\Users\Home\Desktop\react native2\cropapp\node_modules\execa\index.js:174:9)
at C:\Users\Home\Desktop\react native2\cropapp\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (C:\Users\Home\Desktop\react native2\cropapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\Users\Home\Desktop\react native2\cropapp\node_modules\@react-native-community\cli\build\index.js:186:9)

please help them to solve it if i put import fr.michaelvilleneuve.customcrop.RNCustomCropPackage; in PackageList and after run project then auto change to import org.opencv.RNCustomCropPackage;

Ahmad5448 commented 4 years ago

add react- native.config.js file in root of your project and add these lines in it module.exports = { dependencies: { 'react-native-perspective-image-cropper': { platforms: { android: { packageImportPath: 'import fr.michaelvilleneuve.customcrop.RNCustomCropPackage;', } } } } };

Ahmad5448 commented 4 years ago

it will resolve your issue but you will face some other issues in future šŸ“Ÿ

shahzaibali-code commented 4 years ago

@Ahmad5448 thanks bro