我使用“Blank App(Apache cordova)”模板在VS中设置了一个新项目。当尝试使用Mac上的vs-mda-remote为IOS构建应用程序时,构建失败。控制台输出如下:
New build request submitted:
/build/tasks?command=build&vcordova=4.0.0&cfg=debug
{ 'accept-language': 'en-US',
host: 'michaels-mac.local:3000',
connection: 'keep-alive',
'transfer-encoding': 'chunked' }
New build request submitted for cordovaVersion: 4.0.0; buildCommand: build; configuration: debug
Build will be executed under: /Users/mike/remote-builds/builds/13427
Saving build request payload to : /Users/mike/remote-builds/builds/13427
Saved upload to /Users/mike/remote-builds/builds/13427/upload_13427.tgz
POST /build/tasks?command=build&vcordova=4.0.0&cfg=debug 202 15ms - 445b
Extracting /Users/mike/remote-builds/builds/13427/upload_13427.tgz to /Users/mike/remote-builds/builds/13427/cordovaApp...
Extracted app contents from uploaded build request to /Users/mike/remote-builds/builds/13427/cordovaApp. Requesting build.
Taking 13427 as current build
Building cordova app www at appDir /Users/mike/remote-builds/builds/13427/cordovaApp
Opened build log file /Users/mike/remote-builds/builds/13427/build.log
GET /build/tasks/13427 200 2ms - 520b
Done building 13427 : error BuildFailedWithError [ '/Users/mike/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/create: Command failed with exit code 1' ]
Done with currentBuild. Checking for next build in queue.
“build.log”文件的内容如下:
Thu Mar 05 2015 11:47:30 GMT-0800 (PST) Begin building Cordova app at /Users/mike/remote-builds/builds/13427/cordovaApp
adding ios platform...
Creating ios project...
Running command: /Users/mike/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/create --cli /Users/mike/remote-builds/builds/13427/cordovaApp/platforms/ios io.cordova.www www
mv: rename /Users/mike/remote-builds/builds/13427/cordovaApp/platforms/ios/www/__PROJECT_NAME__-Info.plist to /Users/mike/remote-builds/builds/13427/cordovaApp/platforms/ios/www/www-Info.plist: No such file or directory
Command finished with error code 1: /Users/mike/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/create --cli,/Users/mike/remote-builds/builds/13427/cordovaApp/platforms/ios,io.cordova.www,www
Thu Mar 05 2015 11:47:31 GMT-0800 (PST) Failed to build app for buildNumber: 13427: /Users/mike/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/create: Command failed with exit code 1
Thu Mar 05 2015 11:47:31 GMT-0800 (PST) Finished building Cordova app
当解决方案的名称为“www”时,似乎只会出现此问题。使用任何其他解决方案名称,项目可以正确构建。
至于为什么人们想要一个名为“www”的解决方案,请参阅此帖子Ionic and Cordova with Sublime Text 3 + Visual Studio 2013
答案 0 :(得分:1)
你已经回答了自己。 www文件夹是Cordova项目中的保留名称,因此除非您在构建过程的任何一侧破解Node.js vs-mda代码,否则不能使用它。