使用expo构建读取ECONNRESET



我正在为我的应用程序构建一个apk,它是由react native使用expo构建的我在终端中使用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! :)

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

Publishing to channel 'default'...
Building iOS bundle
Building Android bundle
Analyzing assets
Uploading assets
Uploading assetsalert.mp3
Uploading assetsimagessplash.png
Uploading assetsimagesicon.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": ""
}
}

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

即使按照说明操作,我也会出现这个错误,所以对我有效的是禁用我的Windows防火墙。在那之后,它就像一个符咒。

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

最新更新