sbycrosz / react-native-credit-card-input

Easy, cross-platform credit-card input for your React Native Project! Start accepting payment 💰 in your app today!
MIT License
1.47k stars 704 forks source link

# Attempted to redefine property 'style' on android with LiteCreditCard and debug mode false #139

Closed davidducluzeaud closed 3 months ago

davidducluzeaud commented 5 years ago

Hi folks ! I have a bug on android when I have the package installed on Android with debug mode off. Everything else works fine on iOS and android with the debug mode ON. My error is this One. Thanks 😉

image (7)

Ravi448 commented 5 years ago

Facing same issue, Anyone have any fix yet?

image

Mattimus333 commented 5 years ago

Looks like this is an issue with https://github.com/moschan/react-native-flip-card where they have a duplicate style prop.

https://github.com/moschan/react-native-flip-card/issues/75

mosoakinyemi commented 5 years ago

This is a simple error coming from a dependency library (react-native-flip-card). To fix this, just go to

node_modules/react-native-flip-card/lib/FlipCard.js

search for TouchableOpacity and remove the duplicate style={{flex:1}} Good luck guys!

PetteriHaro commented 5 years ago

Getting the same problem.

Don't have react-native-flip-card in my dependencies.

mosoakinyemi commented 5 years ago

Okay @PetteriHaro , does it work in the debug mode?

PetteriHaro commented 5 years ago

@Moshman20 Works perfectly in debug mode on android and in both modes on iOS

mosoakinyemi commented 5 years ago

@PetteriHaro Can you share a screenshot of your node_modules folder. (the area around react-native-credit-card-input folder). Something like this image

PetteriHaro commented 5 years ago

Don't know if it's a dep of a dep but I deleted node_modules and ran npm install again and react-native-flip-card appeared in my node_modules. Your earlier fix on the style={{flex:1}} worked perfectly. @Moshman20 Thanks!

mosoakinyemi commented 5 years ago

Nice! @PetteriHaro Good luck.

davidducluzeaud commented 5 years ago

The PR https://github.com/moschan/react-native-flip-card/issues/75 has been merged ! I can't test if the dependencies have been upgrade, because i did my own card validator but it is just to keep the issue up to date. And thank you all for the quick reaction on this ! 😄