当 gulp 相关依赖项添加到 'devDependencies' 部分时,NativeScript 2.0 [1.7.1] 构建在 'processF0DebugResources' 处失败

NativeScript 2.0 [1.7.1] build is failing at 'processF0DebugResources' when gulp related dependencies are added to 'devDependencies' section

NativeScript 2.0(我正在使用 NativeScript-Angular)构建是 [tns build android] 当 gulp 相关依赖项添加到 'devDependencies'节。

这也是从 1.7.1 开始发生的,但是,我的印象是它会在 2.0 版本中得到修复。看起来 devDependencies 也在构建中。

我也试过 gradlew -debug 没有显示错误,并且发生此错误时也没有生成 .apk 文件。

这里是例外:

:processF0DebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong: Execution failed for task ':processF0DebugResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ' command 'C:\Android\android-sdk\build-tools.0.3\aapt.exe'' finished with non-zero exit value 1

这是我的 package.json:

    "dependencies": {
    "tns-core-modules": "2.0.0",
    "nativescript-angular": "0.0.46",
    "angular2": "2.0.0-beta.16",
    "nativescript-intl": "0.0.2",
    "parse5": "1.4.2",
    "punycode": "1.3.2",
    "querystring": "0.2.0",
    "url": "0.10.3",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.2",
    "zone.js": "0.6.12",
    "es6-shim": "0.35.0"
},
"devDependencies": {
    "babel-traverse": "6.8.0",
    "babel-types": "6.8.1",
    "babylon": "6.8.0",
    "filewalker": "0.1.2",
    "gulp": "3.9.1",
    "gulp-connect": "^4.0.0",
    "gulp-typescript": "^2.13.0",
    "gulp-watch": "^4.3.5",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.1",
    "run-sequence": "^1.1.5",
    "typescript": "^1.8.10"
}

已解决!!

我没有使用 npm install,而是使用了 tns install,它正确构建了所有 devDependencies,我能够成功部署我的应用程序。

感谢 Hristo Deshev 帮助我解决这个问题。