在React-Native,Android中找不到修订

时间:2018-12-08 07:06:14

标签: android react-native

我正在尝试在Android手机上调试我的应用。当我第一次使用以下方法构建应用程序时:

sudo react-native run-android

它可以完美构建,但是当我更改代码并保存时,它不会重新加载,并且每次更改都需要一次又一次地构建。 HMR处于活动状态,并尝试在我的开发菜单上按“重新加载”,但未重新加载。这是更多信息:

  • 使用Visual Studio代码。
  • 我的手机的Android版本:6.0.1
  • 连接:通过USB。
  • USB调试:已为此计算机启用和允许。
  • 使用Linux。
  • Error page in Android phone.

.babelrc

{
    "presets": ["module:metro-react-native-babel-preset"],
    "plugins": ["@babel/proposal-class-properties"]
}

package.json

{
  "name": "hiworld",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "global": "^4.3.2",
    "react": "16.6.1",
    "react-native": "0.57.7"
  },
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-eslint": "^10.0.1",
    "babel-jest": "23.6.0",
    "babel-preset-flow": "^6.23.0",
    "eslint": "^5.9.0",
    "eslint-config-standard": "^12.0.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-node": "^8.0.0",
    "eslint-plugin-promise": "^4.0.1",
    "eslint-plugin-react": "^7.11.1",
    "eslint-plugin-standard": "^4.0.0",
    "jest": "23.6.0",
    "metro-react-native-babel-preset": "0.50.0",
    "react-test-renderer": "16.6.1"
  },
  "jest": {
    "preset": "react-native"
  },
  "main": "index.js",
  "author": "",
  "license": "ISC",
  "description": ""
}

如果您还需要其他任何内容,我将编辑这篇文章。

0 个答案:

没有答案