我正在为我的应用程序构建一个apk,该应用程序是通过使用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 \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": ""
}
}
我假设您使用的是Windows,因为我遇到了完全相同的问题。因此,首先请确认您已遵循此处给出的说明:https://docs.expo.io/versions/latest/distribution/building-standalone-apps/特别是关于安装Ubuntu和启用WSL(按此顺序)。
即使按照说明进行操作,我仍然收到此错误,因此对我有用的是禁用Windows防火墙。之后,它就像一种魅力。