Home > other >  Stuck on black screen when activating debug in React-Native
Stuck on black screen when activating debug in React-Native

Time:05-27

I have a problem with my RN app in my android device (have not tested on iOS yet), as soon as I activate debug on the device, it gets stuck on a black screen.

I dont know what part of the code or what setting is causing this, and this is the reason I am not showing any coding here. Just trying to check if you guys have had the same problem before.

Here is what I have tried:

 gradlew clean 
 react-native start --reset-cache
 cleaned app data and cache in the device
 uninstalled the app from the device

Here are the packages I have installed and using so far on my app:

{
  "name": "bleconnect",
  "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": {
    "@ant-design/icons": "^4.7.0",
    "@react-native-async-storage/async-storage": "^1.15.14",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-firebase/app": "^14.7.0",
    "@react-native-firebase/auth": "^14.2.1",
    "@react-native-firebase/firestore": "^12.4.0",
    "@react-native-firebase/functions": "^14.2.1",
    "@react-native-firebase/storage": "^14.7.0",
    "@react-navigation/drawer": "^6.3.1",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "evil-icons": "^1.10.1",
    "geofirestore": "^4.4.2",
    "haversine": "^1.1.1",
    "node": "^16.13.1",
    "npm-check-updates": "^12.4.0",
    "react": "17.0.1",
    "react-chat-elements": "^11.0.1",
    "react-content-loader": "^6.2.0",
    "react-native": "0.64.2",
    "react-native-animated-spinkit": "^1.5.2",
    "react-native-countdown-circle-timer": "^3.0.6",
    "react-native-device-info": "^8.1.5",
    "react-native-elements": "^3.4.2",
    "react-native-fast-image": "^8.5.11",
    "react-native-gesture-handler": "^2.1.0",
    "react-native-grid-image-viewer": "^1.3.0",
    "react-native-image-crop-picker": "^0.37.3",
    "react-native-image-picker": "^4.7.3",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-location": "^2.5.0",
    "react-native-permissions": "^3.3.1",
    "react-native-reanimated": "^2.8.0",
    "react-native-reanimated-carousel": "^2.4.0",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.10.2",
    "react-native-svg": "^12.3.0",
    "react-native-vector-icons": "^8.1.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "7.14.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.64.0",
    "react-test-renderer": "17.0.1"
  },
  "jest": {
    "preset": "react-native"
  }
}

I would try to npm uninstall all packages and reinstall latest of all but there are specific versions of some libraries that I am using so I cant updated everything to the latest versions.

CodePudding user response:

try to run your project with android studio,i think it has errors that will show here.

CodePudding user response:

I have found a workaround. I force downgraded react-native-reanimated package to 2.2.4 and now the debugger works just fine.

npm i [email protected] --force

if you dont use --force command, it might fail downgrading.

  • Related