1

We have a project using Tipsi Stripe React module, when trying to build for Android I get the following error message: Native Module StripeModule tried to override StripeModule for module name StripeModule.

The error message does not make sense to me and I don't really know where to begin looking since i'm fairly new to mobile and React Native development.

Building for iOS works fine.

enter image description here

ruffen
  • 1,695
  • 2
  • 25
  • 51

1 Answers1

0

I have the same problem, i've tried adding

@Override  
public boolean canOverrideExistingModule() {  
    return true; 
}

to: /tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java based on what i found here How to set canOverrideExistingModule=true.

It compiles, but I haven't tested if it keeps working, if it works i'll fork tipsi-stripe and create a PR later

  • 2
    I figured it out yesterday, in MainApplication.java, the method List getPackages() {} had the stripeModule listed twice, removing one of them worked. In that light, the error message makes sense as well. I will update my answer when I have some time. – ruffen Aug 08 '18 at 11:21
  • Here you can look https://stackoverflow.com/questions/41846452/how-to-set-canoverrideexistingmodule-true-in-react-native-for-android-apps/63438974#63438974 – Irshad Babar Aug 16 '20 at 16:13