react-native-geocoder icon indicating copy to clipboard operation
react-native-geocoder copied to clipboard

Error : Native Module RNGeocoder tried to override RNGeocoderModule

Open NgesBrian opened this issue 6 years ago • 2 comments

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",

NgesBrian avatar Aug 01 '19 11:08 NgesBrian

I have the same error, did you found solution?

ArekChr avatar Sep 15 '19 20:09 ArekChr

Fixed Remove packages.add(new RNGeocoderPackage()); in MainApplication.java

Zyside avatar Jan 31 '20 10:01 Zyside