Error : Native Module RNGeocoder tried to override RNGeocoderModule
I need to get the location of a Particular area using react-native-geocoder package that is Street Address, City and Country.
When I follow the tutorial and edit my MainApplication.java, setting.gradle and build.gradle, I get the following error on emulator screen;
native module RNGeocoder tried to override RNGeocoderModule. Check the getPackages() method in MainApplication.java, it might be that module is being created twice . if this was your intention set canoverrideExistingModule=true
MainApplication.java looks like;
import com.devfd.RNGeocoder.RNGeocoderPackage; ...... @Override protected List<ReactPackage> getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List<ReactPackage> packages = new PackageList(this).getPackages(); packages.add(new RNGeocoderPackage()); return packages; }
I am using ; "react-native": "0.60.4", "react": "16.8.6",
I have the same error, did you found solution?
Fixed Remove packages.add(new RNGeocoderPackage()); in MainApplication.java