错误 CordovaModuleLoadError - visual studio 中的多设备混合应用程序
Error CordovaModuleLoadError - multi device hybrid app in visual studio
我正在按照 here and here 的步骤在 ios 中构建和模拟多设备混合应用程序。
我按照文章中的步骤进行操作,我可以看到,当我 运行 我在 visual studio 中使用 iphone 模拟器作为 运行 目标的多设备混合应用程序时,连接的 mac 设备响应构建请求。但是,mac 终端将结束构建过程并出现以下构建错误:
Done building 5116: error CordovaModuleLoadError [ '3.5.0-0.2.4' ]
这是完整的终端输出:
IBRAHIM-ALHUSSAINs-Mac-mini:cordova IBRAHIMALHUSSAIN$ vs-mda-remote --secure false
vs-mda-remote
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
0.2.11
Loading resources for language en from /usr/local/lib/node_modules/vs-mda-remote/resources/en/resources.json
Build Retention initialized with baseBuildDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds, maxBuildsToKeep 20
Initialized BuildManager with baseBuildDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds; maxBuildsInQueue 10; deleteBuildsOnShutdown true; allowsEmulate true; nextBuildNumber 5115
Remote build server listening on [http] port 3000
ios-sim is installed on path at: /usr/local/lib/node_modules/vs-mda-remote/node_modules/ios-sim/build/release/ios-sim
New build request submitted:
/build/tasks?command=build&vcordova=3.5.0-0.2.4&cfg=release
{ 'accept-language': 'en-US',
host: '192.168.1.11:3000',
connection: 'keep-alive',
'transfer-encoding': 'chunked' }
New build request submitted for cordovaVersion: 3.5.0-0.2.4; buildCommand: build; configuration: release
Build will be executed under: /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116
Saving build request payload to : /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116
Saved upload to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/upload_5116.tgz
Extracting /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/upload_5116.tgz to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp...
POST /build/tasks?command=build&vcordova=3.5.0-0.2.4&cfg=release 202 1279ms - 529b
GET /build/tasks/5116 200 3ms - 529b
Extracted app contents from uploaded build request to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp. Requesting build.
Taking 5116 as current build
Building cordova app B8ak بيتك at appDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp
Opened build log file /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/build.log
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
Done building 5116 : error CordovaModuleLoadError [ '3.5.0-0.2.4' ]
Done with currentBuild. Checking for next build in queue.
GET /build/tasks/5116 200 2ms - 667b
GET /build/tasks/5116/log 200 4ms
这表明您正在使用 Apache Cordova 工具的 CTP2。移动到 CTP3.1 或 VS 2015 RC 应该可以解决您的问题。
VS 2015 还允许您 select 您使用的 Cordova 版本,尽管您可能会发现像 Cordova 3.5.0 这样的旧版本存在问题。 VS 2015 中的默认 4.3.0 应该是兼容的,并且包含许多错误修复,包括安全改进。
VS 2015 将成为 Apache Cordova 工具的受支持版本。以前的版本只是技术预览。
我正在按照 here and here 的步骤在 ios 中构建和模拟多设备混合应用程序。
我按照文章中的步骤进行操作,我可以看到,当我 运行 我在 visual studio 中使用 iphone 模拟器作为 运行 目标的多设备混合应用程序时,连接的 mac 设备响应构建请求。但是,mac 终端将结束构建过程并出现以下构建错误:
Done building 5116: error CordovaModuleLoadError [ '3.5.0-0.2.4' ]
这是完整的终端输出:
IBRAHIM-ALHUSSAINs-Mac-mini:cordova IBRAHIMALHUSSAIN$ vs-mda-remote --secure false
vs-mda-remote
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
0.2.11
Loading resources for language en from /usr/local/lib/node_modules/vs-mda-remote/resources/en/resources.json
Build Retention initialized with baseBuildDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds, maxBuildsToKeep 20
Initialized BuildManager with baseBuildDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds; maxBuildsInQueue 10; deleteBuildsOnShutdown true; allowsEmulate true; nextBuildNumber 5115
Remote build server listening on [http] port 3000
ios-sim is installed on path at: /usr/local/lib/node_modules/vs-mda-remote/node_modules/ios-sim/build/release/ios-sim
New build request submitted:
/build/tasks?command=build&vcordova=3.5.0-0.2.4&cfg=release
{ 'accept-language': 'en-US',
host: '192.168.1.11:3000',
connection: 'keep-alive',
'transfer-encoding': 'chunked' }
New build request submitted for cordovaVersion: 3.5.0-0.2.4; buildCommand: build; configuration: release
Build will be executed under: /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116
Saving build request payload to : /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116
Saved upload to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/upload_5116.tgz
Extracting /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/upload_5116.tgz to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp...
POST /build/tasks?command=build&vcordova=3.5.0-0.2.4&cfg=release 202 1279ms - 529b
GET /build/tasks/5116 200 3ms - 529b
Extracted app contents from uploaded build request to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp. Requesting build.
Taking 5116 as current build
Building cordova app B8ak بيتك at appDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp
Opened build log file /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/build.log
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
Done building 5116 : error CordovaModuleLoadError [ '3.5.0-0.2.4' ]
Done with currentBuild. Checking for next build in queue.
GET /build/tasks/5116 200 2ms - 667b
GET /build/tasks/5116/log 200 4ms
这表明您正在使用 Apache Cordova 工具的 CTP2。移动到 CTP3.1 或 VS 2015 RC 应该可以解决您的问题。
VS 2015 还允许您 select 您使用的 Cordova 版本,尽管您可能会发现像 Cordova 3.5.0 这样的旧版本存在问题。 VS 2015 中的默认 4.3.0 应该是兼容的,并且包含许多错误修复,包括安全改进。
VS 2015 将成为 Apache Cordova 工具的受支持版本。以前的版本只是技术预览。