Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Error : Native Module RNGeocoder tried to override RNGeocoderModule #96

Open
NgesBrian opened this issue Aug 1, 2019 · 2 comments
Open

Comments

@NgesBrian
Copy link

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 getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List packages = new PackageList(this).getPackages();
packages.add(new RNGeocoderPackage());
return packages;
}

I am using ;
"react-native": "0.60.4",
"react": "16.8.6",

@ArekChr
Copy link

ArekChr commented Sep 15, 2019

I have the same error, did you found solution?

@Zyside
Copy link

Zyside commented Jan 31, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants