React native Android SyntaxError: Attempted to redefine property 'key'

后端 未结 3 1846
谎友^
谎友^ 2021-01-18 19:11

I get the following error on Emulators (tested Genymotion and google Stock Emulator) and on a physical device (Samsung S4) after running react-native run-android

3条回答
  •  萌比男神i
    2021-01-18 19:19

    The problem was: key was defined twice in a view somewhere, i.e. something like

    
    

    So just remove one of the key properties.

    Intermediate step to find the solution:

    At first, when pressing Start Chrome Debugging in the React Native Menu, the app will run again, but the error will be shown in the console of the corresponding browser tab. Then it shows a bit better error message.

    Strangely this error doesn't occur on iOS.

提交回复
热议问题