drmas / FireChat

An example how to use React Native + Firebase to create a messaging app
MIT License
118 stars 36 forks source link

Android run time error: Strict mode does not allow function declarations in a lexically nested statement. #2

Open slincke opened 7 years ago

slincke commented 7 years ago

I'm a newbie with react native, so this could (easily) by my error, but I have the iOS version running and its looking great. I'd like to get it running on Android, but have run into the above issue when I try. I'd offer to fix it, but am not yet up to speed. Thanks for sharing this!

rtman commented 7 years ago

I believe its a version issue, try this in your dependencies. package.json

  "dependencies": {
    "@exponent/ex-navigation": "^1.5.29",
    "babel-preset-react-native-stage-0": "^1.0.1",
    "firebase": "^3.4.0",
    "react": "15.3.2",
    "react-native": "0.40.0",
    "react-native-gifted-chat": "0.0.10",
    "react-native-loading-spinner-overlay": "^0.3.0"
  }

Delete node modules folder and do npm install

016chiang commented 6 years ago

react-native:0.40.0 is not support iOS?

shahwajahat99 commented 6 years ago

I am getting the same issue.

waqaramjad commented 5 years ago

same issue