React native expo in development build doesn't connect with device

31 Views Asked by At

I create app with react native expo. Then create an apk file and install it on my phone (Android platform). Then run the command npx expo start --dev-client, a QR code appears, and this apk file opens on the phone. When I change the code, nothing changes in the phone. There are functions that work well in expo go, but do not work in apk, so I need to check this. When I press the r button in the terminal, I get - No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB. I read the documents and watched the video on how to use eas build.

eas.json

`{
  "cli": {
     "version": ">= 7.4.0"
  },
  "build": {
    "preview": {
       "android": {
         "buildType": "apk"
       }
    },
     "preview2": {
       "android": {
        "gradleCommand": ":app:assembleDebug"
      }
    },
    "preview3": {
      "developmentClient": true
    },
    "preview4": {
      "distribution": "internal"
    },
    "production": {}
  }
}`

Everything works well in Switching to --go mode

Steps

  1. eas login
  2. eas build:configure
  3. eas build -p android --profile preview
  4. npx expo start --dev-client
0

There are 0 best solutions below