当与'devDependencies'部分相关联的gulp相关依赖项时,NativeScript 2.0 [1.7.1]构建在'processF0DebugResources'失败

时间:2016-05-05 07:30:10

标签: typescript angular gulp nativescript gulp-typescript

当与gulp相关的依赖关系被添加到'devDependencies'部分时,

NativeScript 2.0(我正在使用NativeScript-Angular)构建[tns build android]在'processF0DebugResources'失败。

这也是自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\23.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"
}

1 个答案:

答案 0 :(得分:10)

解决!!

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

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