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

cannot find symbol import org.opencv.RNCustomCropPackage; #35

Open
hashimkhatri opened this issue Dec 26, 2019 · 11 comments
Open

cannot find symbol import org.opencv.RNCustomCropPackage; #35

hashimkhatri opened this issue Dec 26, 2019 · 11 comments

Comments

@hashimkhatri
Copy link

Error:
cannot find symbol import org.opencv.RNCustomCropPackage;

after changing in MainApplication.java
import org.opencv.RNCustomCropPackage
to
import fr.michaelvilleneuve.customcrop.RNCustomCropPackage;

still same issue. :'( I lost my 7 days on research to reslove this issue

@tarunpatel004
Copy link

@hashimkhatri Did you found any solution?

@TakaKeiji
Copy link

I've just found after following the install steps the import is not made correctly
On PackageList.java:

// react-native-perspective-image-cropper
import org.opencv.RNCustomCropPackage;

But should be like this (I think):

// react-native-perspective-image-cropper
import fr.michaelvilleneuve.customcrop.RNCustomCropPackage;

Changing this on the file, resets automatically on next build command, so no clue how to ride off the error. 🤔

@TakaKeiji
Copy link

Error:
cannot find symbol import org.opencv.RNCustomCropPackage;

after changing in MainApplication.java
import org.opencv.RNCustomCropPackage
to
import fr.michaelvilleneuve.customcrop.RNCustomCropPackage;

still same issue. :'( I lost my 7 days on research to reslove this issue

Every time you make a build action this file is regenerated and your changes are lost, i don't have idea how to change, patch or fix this behavior...

@clsource
Copy link

clsource commented Mar 24, 2020

SOLVED

The main issue is that this library is outdated. @TakaKeiji found a solution.
You just need to modify react-native.config.js to fix the import order.

module.exports = {
  dependencies: {
    'react-native-perspective-image-cropper': {
      platforms: {
        android: {
          packageImportPath: 'import fr.michaelvilleneuve.customcrop.RNCustomCropPackage;',
        }
      }
    }
  }
};

with this change

Sin título

now the imports and build are ok.

photo_2020-03-24 18 01 50

Thanks again to @TakaKeiji

More info: https://github.com/react-native-community/cli/blob/master/docs/platforms.md

@akashSilicon
Copy link

akashSilicon commented Apr 6, 2020

Error:
import org.opencv.RNCustomCropPackage;

symbol: class RNCustomCropPackage
location: package org.opencv

Screenshot 2020-04-06 at 7 36 13 PM


My React Configuration

"react": "16.11.0",
"react-native": "0.62.0",


Did you find any solution ? @tarunpatel004 @hashimkhatri @clsource @Michaelvilleneuve

@duclahoang
Copy link

@clsource Thank you so much <3

@Ahmad5448
Copy link

@clsource where react-native config.js file is located ??

@clsource
Copy link

@clsource where react-native config.js file is located ??

https://github.com/facebook/react-native/blob/0.60-stable/react-native.config.js

@rycks
Copy link

rycks commented May 25, 2020

SOLVED

The main issue is that this library is outdated. @TakaKeiji found a solution.
You just need to modify react-native-config.js to fix the import order.

Warning: right file name is react-native.config.js, not react-native-config.js

:-)

@mohdaamir8182
Copy link

SOLVED

The main issue is that this library is outdated. @TakaKeiji found a solution.
You just need to modify react-native.config.js to fix the import order.

module.exports = {
  dependencies: {
    'react-native-perspective-image-cropper': {
      platforms: {
        android: {
          packageImportPath: 'import fr.michaelvilleneuve.customcrop.RNCustomCropPackage;',
        }
      }
    }
  }
};

with this change

Sin título

now the imports and build are ok.

photo_2020-03-24 18 01 50

Thanks again to @TakaKeiji

More info: https://github.com/react-native-community/cli/blob/master/docs/platforms.md

Thanks

@ShoaibReactNative
Copy link

react-native.config.js file works awesome but is there any way out to add this dynamically like whenever I download the project from my source control I want just only to run yarn and that add these configuration automatically to my node_modules like one here issue and also the react-native.config.js file

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

10 participants