Skip to content

Instantly share code, notes, and snippets.

@Sk-OmarFaruque
Last active February 7, 2019 10:17
Show Gist options
  • Save Sk-OmarFaruque/a90a890def6c841ad506e318db7bc78e to your computer and use it in GitHub Desktop.
Save Sk-OmarFaruque/a90a890def6c841ad506e318db7bc78e to your computer and use it in GitHub Desktop.
Build APK
react-native bundle --dev false --platform android --entry-file index.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
cd android/
./gradlew assembleDebug
gradlew permission
chmod 755 android/gradlew
@Sk-OmarFaruque
Copy link
Author

sudo rm -rf android/ ios/ #Delete Android and ios folders first...
react-native eject
react-native upgrade //rebuilds android/ios folders
react-native link
react-native run-android
react-native run-ios

@Sk-OmarFaruque
Copy link
Author

Sk-OmarFaruque commented Feb 7, 2019

import { NavigationActions, StackActions } from 'react-navigation'
const resetAction = StackActions.reset({
index: 0,
key: null, // <-- this
actions: [NavigationActions.navigate({ routeName: route })]
})
this.props.navigation.dispatch(resetAction)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment