使用Hosted VS2017计算机执行离子/科尔多瓦构建作业,无论我如何更改,都会卡住:
Queueing build for platform android w/options: --release,--device,--gradleArg=--no-daemon
Processing res/native for android
add to body class: platform-android
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_172
Welcome to Gradle 4.8!
Here are the highlights of this release:
- Dependency locking
- Maven Publish and Ivy Publish plugins improved and marked stable
- Incremental annotation processing enhancements
- APIs to configure tasks at creation time
For more details see https://docs.gradle.org/4.8/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :wrapper
BUILD SUCCESSFUL in 34s
1 actionable task: 1 executed
我在VSTS文档中读到gradle守护程序将被卡住,因此您应该将一个钩子添加到after_compile文件夹中
IF EXIST platforms\android platforms\android\gradlew --stop
但这似乎也不起作用。我尝试删除build.json中的代码签名,但这似乎也无济于事,甚至尝试通过npm自举整个过程
npm run cordova -- build android --release --device --gradleArg=--no-daemon
相同的问题。我已经在我的taco.json中尝试过Cordova 6.5.0、7.1.0和8.0.0,同样的问题。我真的感觉好像是gradle守护进程被卡住了,但是钩子被忽略了,或者它们被更改了,我只是现在找不到应该去的地方或位置。
内部定义:
{
"badgeEnabled": null,
"buildNumberFormat": null,
"comment": null,
"createdDate": "2018-07-18T15:31:11.333000+00:00",
"demands": null,
"description": null,
"draftOf": null,
"dropLocation": null,
"id": ,
"jobAuthorizationScope": "projectCollection",
"jobCancelTimeoutInMinutes": 5,
"jobTimeoutInMinutes": 60,
"latestBuild": null,
"latestCompletedBuild": null,
"metrics": null,
"name": "Mobile Builds",
"path": "\\project",
"process": {
"phases": [
{
"condition": "succeeded()",
"jobAuthorizationScope": "projectCollection",
"jobCancelTimeoutInMinutes": 1,
"name": "Android",
"refName": "Phase_1",
"steps": [
{
"alwaysRun": false,
"condition": "succeeded()",
"continueOnError": false,
"displayName": "install",
"enabled": true,
"environment": {},
"inputs": {
"command": "install",
"customCommand": "",
"customEndpoint": "",
"customFeed": "",
"customRegistry": "useNpmrc",
"publishEndpoint": "",
"publishFeed": "",
"publishRegistry": "useExternalRegistry",
"verbose": "false",
"workingDir": "WorkDir"
},
"task": {
"definitionType": "task",
"id": "fe47e961-9fa8-4106-8639-368c022d43ad",
"versionSpec": "1.*"
},
"timeoutInMinutes": 0
},
{
"alwaysRun": false,
"condition": "succeeded()",
"continueOnError": false,
"displayName": "gulp sass",
"enabled": true,
"environment": {},
"inputs": {
"command": "custom",
"customCommand": "run gulp -- sass",
"customEndpoint": "",
"customFeed": "",
"customRegistry": "useNpmrc",
"publishEndpoint": "",
"publishFeed": "",
"publishRegistry": "useExternalRegistry",
"verbose": "false",
"workingDir": "WorkDir"
},
"task": {
"definitionType": "task",
"id": "fe47e961-9fa8-4106-8639-368c022d43ad",
"versionSpec": "1.*"
},
"timeoutInMinutes": 0
},
{
"alwaysRun": false,
"condition": "succeeded()",
"continueOnError": false,
"displayName": "Cordova Build android",
"enabled": true,
"environment": {},
"inputs": {
"antBuild": "false",
"archs": "",
"configuration": "release",
"cordovaArgs": "",
"cordovaVersion": "",
"cwd": "WorkDir",
"defaultKeychainPassword": "",
"iosSignMethod": "file",
"iosSigningIdentity": "",
"keyPass": "",
"keystoreAlias": "",
"keystoreFile": "",
"keystorePass": "",
"outputPattern": "bin",
"p12": "",
"p12pwd": "",
"platform": "android",
"provProfile": "",
"provProfileUuid": "",
"removeProfile": "false",
"targetEmulator": "false",
"unlockDefaultKeychain": "false",
"windowsAppx": "",
"windowsOnly": "false",
"windowsPhoneOnly": "false",
"xcodeDeveloperDir": ""
},
"task": {
"definitionType": "task",
"id": "70e94267-15dc-434d-8973-023d766825d7",
"versionSpec": "1.*"
},
"timeoutInMinutes": 0
},
{
"alwaysRun": false,
"condition": "succeeded()",
"continueOnError": false,
"displayName": "Copy Release Notes to Android Build Folder",
"enabled": true,
"environment": {},
"inputs": {
"CleanTargetFolder": "false",
"Contents": "release-notes.txt",
"OverWrite": "false",
"SourceFolder": "WorkDir",
"TargetFolder": "bin/Android/Release",
"flattenFolders": "false"
},
"task": {
"definitionType": "task",
"id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c",
"versionSpec": "2.*"
},
"timeoutInMinutes": 0
},
{
"alwaysRun": false,
"condition": "succeeded()",
"continueOnError": false,
"displayName": "Publish Artifact: Android",
"enabled": true,
"environment": {},
"inputs": {
"ArtifactName": "Android",
"ArtifactType": "Container",
"Parallel": "false",
"ParallelCount": "8",
"PathtoPublish": "WorkDir/bin/Android/Release",
"TargetPath": ""
},
"task": {
"definitionType": "task",
"id": "2ff763a7-ce83-4e1f-bc89-0ae63477cebe",
"versionSpec": "1.*"
},
"timeoutInMinutes": 0
}
],
"target": {
"allowScriptsAuthAccessOption": false,
"executionOptions": {
"type": 0
},
"type": 1
}
}
],
"type": 1
},
"processParameters": {
"additionalProperties": {},
"dataSourceBindings": null,
"inputs": null,
"sourceDefinitions": null
},
"properties": {},
"quality": "definition",
"queue": {
"additionalProperties": {},
"id": 288,
"name": "Hosted VS2017",
"pool": {
"additionalProperties": {},
"id": 10,
"isHosted": true,
"name": "Hosted VS2017"
},
"url": "https://account.visualstudio.com/_apis/build/Queues/288"
},
"queueStatus": "enabled",
"repository": {
"additionalProperties": {},
"checkoutSubmodules": false,
"clean": "false",
"defaultBranch": "refs/heads/master",
"id": "ce667db8-941e-47a6-b191-3cb5cf478f69",
"name": "repo",
"properties": {
"checkoutNestedSubmodules": "false",
"cleanOptions": "0",
"fetchDepth": "0",
"gitLfsSupport": "false",
"labelSources": "0",
"labelSourcesFormat": "$(build.buildNumber)",
"reportBuildStatus": "true",
"skipSyncSource": "false"
},
"rootFolder": null,
"type": "TfsGit",
"url": "https://account.visualstudio.com/project/_git/repo"
},
"revision": 15,
"tags": [],
"triggers": null,
"type": "build",
"uri": "vstfs:///Build/Definition/160",
"url": "https://account.visualstudio.com/guid/_apis/build/Definitions/160?revision=15",
"variableGroups": null,
"variables": {
"system.debug": {
"additionalProperties": {},
"allowOverride": true,
"isSecret": null,
"value": "false"
}
}
}
答案 0 :(得分:0)
我们的ionic 1项目在hooks目录中有一堆奇怪的钩子脚本,我认为这时已经在cordova构建过程中实现了。清理我们的hooks目录,只解决需要解决的问题。