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

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

Open
shahzaibali-code opened this issue Jun 2, 2020 · 3 comments

Comments

@shahzaibali-code
Copy link

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

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

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
Copy link

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
Copy link

it will resolve your issue but you will face some other issues in future 📟

@shahzaibali-code
Copy link
Author

@Ahmad5448 thanks bro

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

No branches or pull requests

2 participants