VSTS Cordova Android构建作业卡住
将托管的VS2017计算机用于ionic/cordova构建作业,无论我如何更改,它都会陷入困境:VSTS Cordova Android构建作业卡住,android,cordova,azure-devops,visual-studio-cordova,Android,Cordova,Azure Devops,Visual Studio Cordova,将托管的VS2017计算机用于ionic/cordova构建作业,无论我如何更改,它都会陷入困境: 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)\Andr
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运行cordova--buildandroid--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"
}
}
}
我们的ionic 1项目在hooks目录中有一堆奇怪的hook脚本,我认为现在已经在cordova构建过程中实现了这些脚本。清理我们的hooks目录,只进行必要的修复。您能分享您的构建定义吗?您可以在本地运行构建吗?除了JSON,您不知道其他共享构建定义的方法。。。但它现在在上面。这是一个Ionic 1项目,所以不,我没有尝试在本地构建它,我们使用VS和TACO工具来帮助我们不必管理所有这些,这也是我使用VS 2017托管机器的原因。但是,这是一个很好的观点,我现在将从本地开始讨论这一问题。您可以捕获构建定义的屏幕截图。请让我们知道您本地构建的结果。因此,本地构建确实失败了,但它失败的程度远远超过了这项工作。我从gradle开始就通过了,它会下载什么的。在本地,这是它最终抛出的错误,但我觉得这是无关的,我不知道,也许不是:在包“android”中找不到属性“appComponentFactory”的资源标识符。我可以让我的本地构建与插件解决方案一起工作。。。是的,这两个问题不相关。当我使用cordova插件添加cordova android support gradle release——变量android_support_VERSION=27时,+它修复了“appComponentFactory”问题,并给了我一个apk,但托管的VS 2017构建仍然暂停