
Getting this error while trying to install NativeStarter Pro Seed
Sounds like you've integrated it twice, however I cannot provide support for NativeStarter Pro Seed, please ask them.
I have the same problem did you find a solution ?
I solve the issue modifying the MainActivity.java file. Vector module was declarated several time. Just remove the import and it works.
I found my issue in MainApplication.java, it had repetitions of
import com.oblador.vectoricons.VectorIconsPackage;
import com.microsoft.codepush.react.CodePush;
and changed
protected List
return Arrays.
new MainReactPackage(),
new VectorIconsPackage(),
new CodePush(null, getApplicationContext(), BuildConfig.DEBUG),
new VectorIconsPackage(),
new CodePush(null, getApplicationContext(), BuildConfig.DEBUG)
);
}
TO
protected List
return Arrays.
new MainReactPackage(),
new VectorIconsPackage(),
new CodePush(null, getApplicationContext(), BuildConfig.DEBUG),
);
}
@tichon007 In my case i had to remove duplicate imports from MainApplication.java.
Thank you so much for the heads-up.
I solve the issue modifying the MainActivity.java.
Yes, it multiply several time in MainApplication.java
I had the same problem. You can see the locations of duplicates in the screenshots below. Just remove the duplicates, and it works fine.


Yep, same here. It happens with you run react-native link react-native-vector-icons. Is something in the link script supposed to check if it has already been added?
should be reopened
@phiricharles101 Thanks! It worked :)
had
import com.facebook.react.ReactApplication;
import com.oblador.vectoricons.VectorIconsPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
and
@Override
protected List
return Arrays.
new MainReactPackage(),
new VectorIconsPackage(),
new VectorIconsPackage()
);
}
After React Native 0.60. You don't need to add packages in MainApplication.java, because they come up with Autolinking of packages in this release.
After React Native 0.60. You don't need to add packages in MainApplication.java, because they come up with Autolinking of packages in this release.
@MrAhmedSaeed .
sir,
if module not support the autolink then what should to do ?
I've 3 module which one not supported autolink.
I am using React Native 0.61.5. By mistake I linked package manually. In solution, I unlink it manually.
Just run "react-native unlink react-native-vector-icons"
I got this solution from here https://stackoverflow.com/a/57272709
If you are on RN >= 0.60.0, then most of the packages are linked automatically.
If you have install and does linkage manually then run command "react-native unlink package_name".
And re run your project.
This is how I resolved this.
After React Native 0.60. You don't need to add packages in MainApplication.java, because they come up with Autolinking of packages in this release.
Thanks man
Most helpful comment
I solve the issue modifying the MainActivity.java file. Vector module was declarated several time. Just remove the import and it works.