1

我正在 Visual Studio 2013 中通过 multi-device-hybrid-apps 使用 Cordova 开发移动应用程序,调试配置一切正常,应用程序将正确编译并安装在设备上。但是当我尝试通过 Release 或 Distribution 配置编译和部署时,它会给我这个错误

Error code 1 for command: cmd with args: /s,/c,ant,release,-f,d:\PhoneGap\projects\MyWeddingCard\MyWeddingCard\bld\Distribution\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
1>  Command finished with error code 2: d:\phonegap\projects\MyWeddingCard\MyWeddingCard\bld\Distribution\platforms\android\cordova\build.bat --release,
1>  
1>  C:\Users\RezaRa\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:126
1>                      throw e;
1>                            ^
1>EXEC : error : d:\phonegap\projects\MyWeddingCard\MyWeddingCard\bld\Distribution\platforms\android\cordova\build.bat: Command failed with exit code 2
1>      at ChildProcess.whenDone (C:\Users\RezaRa\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
1>      at ChildProcess.emit (events.js:98:17)
1>      at maybeClose (child_process.js:756:16)
1>      at Process.ChildProcess._handle.onexit (child_process.js:823:5)

我知道这是一个普遍的错误,但有什么办法可以理解问题所在。

ps 我已经创建了 Keystore 文件并添加到 ant.properties 文件中。

4

1 回答 1

6

我发现了我在 ant 属性中更改密钥库文件路径的问题

key.store=D:\PhoneGap\projects\MyWeddingCard\Key\MyWeddingCardKeystore.keystore

key.store=D:\\PhoneGap\\projects\\MyWeddingCard\\Key\\MyWeddingCardKeystore.keystore

于 2014-10-19T13:59:42.730 回答