在添加android / iOS平台或运行ionic cordova resources --force
这未完成时,始终在生成平台资源步骤中继续停止。
我验证了这一点,同时在api调用(https://res.ionic.io/api/v1/transform)上生成503错误。
我检查离子状态(https://status.ionicframework.com/),但在那里,所有系统都正常运行。
编辑
我的ionic info
:
Ionic:
ionic (Ionic CLI) : 4.0.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
System:
NodeJS : v10.6.0 (/usr/local/bin/node)
npm : 6.1.0
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
我的package.json
:
"dependencies": {
"@angular/animations": "5.2.11",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@ionic-native/core": "^4.10.1",
"@ionic-native/header-color": "^4.10.1",
"@ionic-native/local-notifications": "^4.10.1",
"@ionic-native/qr-scanner": "^4.10.1",
"@ionic-native/social-sharing": "^4.10.1",
"@ionic-native/splash-screen": "^4.10.1",
"@ionic-native/status-bar": "^4.10.1",
"@ionic/cli-utils": "^2.0.1",
"@ionic/storage": "2.1.3",
"cordova-android": "^7.1.1",
"cordova-ios": "^4.5.5",
"cordova-plugin-add-swift-support": "^1.7.2",
"cordova-plugin-badge": "^0.8.7",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-headercolor": "^1.0.0",
"cordova-plugin-ionic-webview": "^2.0.1",
"cordova-plugin-local-notification": "^0.9.0-beta.2",
"cordova-plugin-qrscanner": "^2.6.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.4.1",
"es6-promise-plugin": "^4.2.2",
"ionic-angular": "^3.9.2",
"ionic-img-viewer": "^2.9.0",
"ionicons": "^4.2.5",
"ng-svg-icon-sprite": "^0.8.0",
"rxjs": "^5.5.11",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "^3.1.11",
"typescript": "2.6.2"
}
我的ionic -v
是CLI PRO 4.0.1
编辑2
有些时候,进程返回错误(倍数),例如:
Generating platform resources - failed!
[ERROR] Resource server responded with an error.
This could mean the server is experiencing difficulties right now--please try again later.
Request: POST https://res.ionic.io/api/v1/transform
Response: 400
谁有这个问题?建议?
问题很可能与使用的图像大小有关,而不是与force命令本身有关。
确保您的图标具有以下最小尺寸(1200×1200像素)
并且您的飞溅具有以下最小尺寸(2732×2732像素)而不是(2208×2208像素)。
使用以下任一命令生成资源
$ ionic cordova resources
$ ionic cordova resources ios
$ ionic cordova resources android