尝试使用Android的build
Cordova项目时,构建失败并出现如下错误:
d:\ a_tasks \ CordovaBuild_70e94267-15dc-434D-8973-023d766825d7 \ 1.3.11 \ lib中\科尔多瓦-task.js:70 process.chdir(CWD); ^错误:ENOENT:没有这样的文件或目录,uv_chdir
有谁能告诉我如何解决此错误?
日志文件说:
2017-11-01T09:58:52.7209717Z ##[debug]Evaluating condition for step: 'Cordova Build android'
2017-11-01T09:58:52.7209717Z ##[debug]Evaluating: succeeded()
2017-11-01T09:58:52.7209717Z ##[debug]Evaluating succeeded:
2017-11-01T09:58:52.7209717Z ##[debug]=> (Boolean) True
2017-11-01T09:58:52.7209717Z ##[debug]Expanded: True
2017-11-01T09:58:52.7209717Z ##[debug]Result: True
2017-11-01T09:58:52.7209717Z ##[section]Starting: Cordova Build android
2017-11-01T09:58:52.7509720Z ==============================================================================
2017-11-01T09:58:52.7509720Z Task : Cordova Build
2017-11-01T09:58:52.7509720Z Description : Build a hybrid app project based on the Cordova CLI, Ionic CLI, TACO CLI, or other Cordova-compliant CLI
2017-11-01T09:58:52.7509720Z Version : 1.3.11
2017-11-01T09:58:52.7509720Z Author : Microsoft Corporation
2017-11-01T09:58:52.7509720Z Help : [More Information](http://go.microsoft.com/fwlink/?LinkID=691186)
2017-11-01T09:58:52.7509720Z ==============================================================================
2017-11-01T09:58:52.7679724Z ##[debug]tf vc resolvePath "$\VisitReport_Br\Client Components\Main\Source\visitreportpoc_client with windows and android working\visitreportpoc.sln" /loginType:OAuth /login:.,******** /noprompt
2017-11-01T09:58:53.3029712Z ##[debug]d:\a\1\s\Client Components\Main\Source\visitreportpoc_client with windows and android working\visitreportpoc.sln
2017-11-01T09:58:55.1959726Z ##[debug]agent.workFolder=d:\a
2017-11-01T09:58:55.2239725Z ##[debug]loading inputs and endpoints
2017-11-01T09:58:55.2239725Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2017-11-01T09:58:55.2239725Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2017-11-01T09:58:55.2239725Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_ANTBUILD
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_CONFIGURATION
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_CORDOVAVERSION
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_CWD
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_IOSSIGNMETHOD
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_KEYSTOREFILE
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_OUTPUTPATTERN
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_P12
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_PLATFORM
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_PROVPROFILE
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_REMOVEPROFILE
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_TARGETEMULATOR
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_UNLOCKDEFAULTKEYCHAIN
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_WINDOWSONLY
2017-11-01T09:58:55.2239725Z ##[debug]loading INPUT_WINDOWSPHONEONLY
2017-11-01T09:58:55.2239725Z ##[debug]loaded 18
2017-11-01T09:58:55.2239725Z ##[debug]BUILD_SOURCEDIRECTORY=undefined
2017-11-01T09:58:55.2239725Z ##[debug]BUILD_SOURCESDIRECTORY=d:\a\1\s
2017-11-01T09:58:55.2249717Z ##[debug]CWD=d:\a\1\s\Client Components\Main\Source\visitreportpoc_client with windows and android working\visitreportpoc.sln
2017-11-01T09:58:55.2249717Z ##[debug]XCODEDEVELOPERDIR=null
2017-11-01T09:58:55.2249717Z ##[debug]CONFIGURATION=Debug
2017-11-01T09:58:55.2249717Z ##[debug]ARCHS=null
2017-11-01T09:58:55.2249717Z ##[debug]PLATFORM=android
2017-11-01T09:58:55.2249717Z ##[debug]TARGETEMULATOR=false
2017-11-01T09:58:55.2249717Z ##[debug]WINDOWSAPPX=null
2017-11-01T09:58:55.2249717Z ##[debug]WINDOWSONLY=false
2017-11-01T09:58:55.2249717Z ##[debug]WINDOWSPHONEONLY=false
2017-11-01T09:58:55.2249717Z ##[debug]UNLOCKDEFAULTKEYCHAIN=false
2017-11-01T09:58:55.2249717Z ##[debug]DEFAULTKEYCHAINPASSWORD=null
2017-11-01T09:58:55.2249717Z ##[debug]P12=d:\a\1\s
2017-11-01T09:58:55.2249717Z ##[debug]P12PWD=null
2017-11-01T09:58:55.2249717Z ##[debug]IOSSIGNINGIDENTITY=null
2017-11-01T09:58:55.2249717Z ##[debug]PROVPROFILEUUID=null
2017-11-01T09:58:55.2249717Z ##[debug]PROVPROFILE=d:\a\1\s
2017-11-01T09:58:55.2249717Z ##[debug]REMOVEPROFILE=false
2017-11-01T09:58:55.2249717Z ##[debug]ANTBUILD=false
2017-11-01T09:58:55.2249717Z ##[debug]KEYSTOREFILE=d:\a\1\s
2017-11-01T09:58:55.2249717Z ##[debug]KEYSTOREPASS=null
2017-11-01T09:58:55.2249717Z ##[debug]KEYSTOREALIAS=null
2017-11-01T09:58:55.2249717Z ##[debug]KEYPASS=null
2017-11-01T09:58:55.2249717Z ##[debug]OUTPUTPATTERN=bin
2017-11-01T09:58:55.2249717Z ##[debug]CORDOVAARGS=null
2017-11-01T09:58:55.2249717Z ##[debug]CORDOVAVERSION=6.2.1
2017-11-01T09:58:56.7119726Z d:\a\_tasks\CordovaBuild_70e94267-15dc-434d-8973-023d766825d7\1.3.11\lib\cordova-task.js:70
2017-11-01T09:58:56.7119726Z process.chdir(cwd);
2017-11-01T09:58:56.7119726Z ^
2017-11-01T09:58:56.7119726Z
2017-11-01T09:58:56.7119726Z Error: ENOENT: no such file or directory, uv_chdir
2017-11-01T09:58:56.7119726Z at Error (native)
2017-11-01T09:58:56.7119726Z at processInputs (d:\a\_tasks\CordovaBuild_70e94267-15dc-434d-8973-023d766825d7\1.3.11\lib\cordova-task.js:70:13)
2017-11-01T09:58:56.7119726Z at Object.<anonymous> (d:\a\_tasks\CordovaBuild_70e94267-15dc-434d-8973-023d766825d7\1.3.11\lib\cordova-task.js:32:1)
2017-11-01T09:58:56.7119726Z at Module._compile (module.js:570:32)
2017-11-01T09:58:56.7129723Z at Object.Module._extensions..js (module.js:579:10)
2017-11-01T09:58:56.7129723Z at Module.load (module.js:487:32)
2017-11-01T09:58:56.7129723Z at tryModuleLoad (module.js:446:12)
2017-11-01T09:58:56.7189705Z at Function.Module._load (module.js:438:3)
2017-11-01T09:58:56.7189705Z at Module.runMain (module.js:604:10)
2017-11-01T09:58:56.7189705Z at run (bootstrap_node.js:394:7)
2017-11-01T09:58:56.7309743Z ##[debug]task result: Failed
2017-11-01T09:58:56.7399729Z ##[error]Task failed
2017-11-01T09:58:56.7399729Z ##[debug]Processed: ##vso[task.issue type=error;]Task failed
2017-11-01T09:58:56.7419727Z ##[debug]Processed: ##vso[task.complete result=Failed;]Task failed
2017-11-01T09:58:56.7479948Z ##[section]Finishing: Cordova Build android
get source的详细日志上传到链接:
https://drive.google.com/file/d/0Bw3JaIcGOgq7TFd2UHN5bHJ5TkE/view?usp=sharing
所有更改后的详细日志的zip文件是:
https://drive.google.com/file/d/0Bw3JaIcGOgq7VWxWSDJLYUVZUjQ/view?usp=sharing
答案 0 :(得分:0)
答案 1 :(得分:0)
在Cordova Build的工作目录中,我错误地选择了.sln文件而不是工作目录本身。将.sln文件中的路径更改为包含.sln文件的工作文件夹后,构建成功完成。