Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29457

App crashes on launch time with react native CLI after installing react-navigation 5

$
0
0

I have installed all the packages for react-navigation. I have followed all the instructions given from React Navigation.

After installation when I build the app it's building successfully but getting crashed after installing on emulator. I have also tried it on my phone. But every time it's getting crashed. Here is screenshot of my project Screenshot.

I also find out that it's crashing only when i installed

(#Installing dependencies into a bare React Native project) this part of react navigation.

npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view

Here are some others code of my project.

package.json

{"name": "KhulnaWheels","version": "0.0.1","private": true,"scripts": {"android": "react-native run-android","ios": "react-native run-ios","start": "react-native start","test": "jest","lint": "eslint ."  },"dependencies": {"@react-native-community/masked-view": "^0.1.6","@react-navigation/bottom-tabs": "^5.1.0","@react-navigation/drawer": "^5.1.0","@react-navigation/material-bottom-tabs": "^5.1.0","@react-navigation/material-top-tabs": "^5.1.0","@react-navigation/native": "^5.0.8","@react-navigation/stack": "^5.1.0","react": "16.9.0","react-native": "0.61.5","react-native-gesture-handler": "^1.6.0","react-native-paper": "^3.6.0","react-native-reanimated": "^1.7.0","react-native-safe-area-context": "^0.7.3","react-native-screens": "^2.2.0","react-native-tab-view": "^2.13.0"  },"devDependencies": {"@babel/core": "^7.6.2","@babel/runtime": "^7.6.2","@react-native-community/eslint-config": "^0.0.5","babel-jest": "^24.9.0","eslint": "^6.5.1","jest": "^24.9.0","metro-react-native-babel-preset": "^0.56.0","react-test-renderer": "16.9.0"  },"jest": {"preset": "react-native"  }}

android\app\build.gradle (dependencies section only)

dependencies {    implementation 'androidx.appcompat:appcompat:1.1.0-rc02'    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha03'    implementation fileTree(dir: "libs", include: ["*.jar"])    implementation "com.facebook.react:react-native:+"  // From node_modules    if (enableHermes) {        def hermesPath = "../../node_modules/hermes-engine/android/";        debugImplementation files(hermesPath +"hermes-debug.aar")        releaseImplementation files(hermesPath +"hermes-release.aar")    } else {        implementation jscFlavor    }}

index.js

import 'react-native-gesture-handler';import {AppRegistry} from 'react-native';import App from './App';import {name as appName} from './app.json';AppRegistry.registerComponent(appName, () => App);

Viewing all articles
Browse latest Browse all 29457

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>