bberak / react-native-game-engine-handbook

A React Native app showcasing some examples using react-native-game-engine 🐒✨
MIT License
598 stars 85 forks source link

error when using the left arrow to go back #14

Closed Ladvace closed 3 years ago

Ladvace commented 4 years ago

If you go on "Touch Events" and then you try to go back you will have this error: `Invariant Violation: [105,"RCTImageView",{"marginLeft":"<>"}] is not usable as a native method argument

This error is located at: in RCTImageView (at Image.android.js:254) in Image (at createAnimatedComponent.js:151) in AnimatedComponent (at createAnimatableComponent.js:571) in withAnimatable(Image) (at backButton.js:53) in RCTView (at View.js:45) in View (at createAnimatedComponent.js:151) in AnimatedComponent (at TouchableOpacity.js:282) in TouchableOpacity (at backButton.js:45) in BackButton (at table-of-contents/index.js:85) in RCTView (at View.js:45) in View (at table-of-contents/index.js:122) in RCTView (at View.js:45) in View (at ScrollView.js:976) in RCTScrollView (at ScrollView.js:1115) in ScrollView (at table-of-contents/index.js:119) in RCTView (at View.js:45) in View (at GameEngine.js:176) in RCTView (at View.js:45) in View (at GameEngine.js:163) in GameEngine (at table-of-contents/index.js:99) in RCTView (at View.js:45) in View (at NativeLinearGradient.android.js:23) in NativeLinearGradient (at LinearGradient.js:12) in LinearGradient (at table-of-contents/index.js:94) in TableOfContents (at App.android.js:41) in RCTView (at View.js:45) in View (at App.android.js:40) in App (at withExpoRoot.js:20) in RootErrorBoundary (at withExpoRoot.js:19) in ExpoRootComponent (at renderApplication.js:35) in RCTView (at View.js:45) in View (at AppContainer.js:98) in RCTView (at View.js:45) in View (at AppContainer.js:115) in AppContainer (at renderApplication.js:34)

bberak commented 4 years ago

Sorry I missed this issue @Ladvace..

I recently bought a new Android phone so will try reproduce this.

Thanks for the report.

bberak commented 4 years ago

Hi @Ladvace,

I've just updated the app to work with the latest version of Expo. I've also fixed this issue. Upgrade steps:

cd react-native-game-engine-handbook
rm -rf node_modules
git pull
npm install -g expo-cli
npm install
npm run start
# You might also need to update the Expo client on your devices

If it helps, I'm running the following versions:

node -v: v12.13.0
npm -v: 6.12.0
expo --version: 3.21.13

Let me know how that goes, cheers!

bberak commented 3 years ago

Hi @Ladvace,

I'm closing this issue for now, but please feel free to re-open it if necessary. Cheers!