我在ubuntu中遇到了同样的问题,对我有用的是我关闭的终端从重新启动的USB中删除了我的设备。首先建议您将这些行添加到package.json中,用以下命令替换脚本
"scripts": {"prepare-repository": "npm i -g react-native-cli yarn;yarn install; react-native link","emulator": "emulator -avd Nexus5V6L23_x86_64 -scale 1.0","install": "react-native run-android","start": "react-native start --reset-cache","android": "npm run install && npm run start","clean": "watchman watch-del-all && npm cache clean && cd android && ./gradlew clean && cd ..","test": "jest"}之后,将其保存,然后转到创建项目的文件夹。假设我的住所/工作区/演示。在运行脚本中
npm run clean this will clear all cache
之后
npm run android
它将在设备以及启动重置缓存中运行应用程序。让我知道它是否有帮助。
编辑!!!有时在运行npm run android之前添加adb reverse tcp:8081会执行tricj



