【问题标题】:read ECONNRESET using expo build使用 expo build 读取 ECONNRESET
【发布时间】:2020-07-16 03:38:12
【问题描述】:

我正在为我的应用程序构建一个 apk,它是通过使用 expo 的 react native 构建的 我在终端中使用expo build:android 命令,之后我得到一个提示以供选择:

? Would you like to upload a keystore or have us generate one for you?
If you don't know what this means, let us handle it! :)

所以我选择了expo来处理它,我得到了以下步骤

Publishing to channel 'default'...
Building iOS bundle
Building Android bundle
Analyzing assets
Uploading assets
Uploading \assets\alert.mp3
Uploading \assets\images\splash.png
Uploading \assets\images\icon.png

然后我得到了以下错误

read ECONNRESET
Set EXPO_DEBUG=true in your env to view the stack trace.

我还更新了 expo-cli 到最新版本! 如果有帮助,这是我的 app.json

 {
  "expo": {
    "name": "app name",
    "slug": "app-name",
    "platforms": [
      "android"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "scheme": "myapp",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "android": {
      "package": "com.el3ameed.appname",
      "versionCode": 1,
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/icon.png",
        "backgroundColor": "#171717"
      }
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "bundleIdentifier": "com.el3ameed.appname",
      "buildNumber": "1.0.0"
    },
    "description": ""
  }
}

【问题讨论】:

    标签: android react-native build expo


    【解决方案1】:

    我假设您使用的是 Windows,因为我遇到了完全相同的问题。 因此,首先验证您是否已按照此处给出的说明进行操作: https://docs.expo.io/versions/latest/distribution/building-standalone-apps/ 特别是关于安装 Ubuntu 和启用 WSL(按此顺序)。

    即使按照说明操作后,我仍然收到此错误,所以对我有用的是禁用我的 Windows 防火墙。之后,它就像一个魅力。

    作为最后的手段,尝试使用对我也有效的 VPN。

    【讨论】:

    • 除了vpn我都试过了,但还是不行,我会尝试使用vpn并通知你谢谢
    • 谢谢,它有效!但不幸的是,我收到了另一个与资产相关的错误,我会用它发布一个问题,再次感谢
    • stackoverflow.com/questions/61164119/… 如果你能帮忙的话!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-09-11
    • 2017-09-03
    • 1970-01-01
    • 2022-01-02
    • 1970-01-01
    • 2015-05-02
    • 2018-06-13
    相关资源
    最近更新 更多