Open HamaniKhalil opened 2 years ago
For those who have the same issue, you may have installed both react-native-image-crop-picker
and react-native-customized-image-picker
libraries, which is the real reason why there's ambiguous class names, and not because of the @react-native-community/toolbar-android
as I said in the issue description.
Solution Use one of the two libraries and not both.
Apologies for the mistake. I highly recommend using react-native-customized-image-picker
as it's immensely helpful.
Side note
I also recommend the maintainers of the project to use a different name to avoid possible ambiguities in the future, the name PickerPackage
tends to be quite generic for a class, other purposed libraries may name theirs that way and that may cause a problem for developers to integrate two features they really need in their application.
The library seems to have a problem, since it defines a class named
PickerPackage
that has the exact same name that to@react-native-community/toolbar-android
one.So, the generated
PackageList.java
file contains imports with two ambiguous classes as following :The versions that I'm using for these libraries are :
A possible fix, maybe to put an alias ahead of the import line with a very specific name, if possible a unique one, so that the problem don't occur int the future with any other libraries. Or else, rename the
PickerPackage
class.