[英]Mobilefirst 7.1 CLI + Ionic Android Build Failed
我在互聯網上進行了很多搜索,並找到了很多關於它的問題/解決方案,但找不到適合我的解決方案。
我使用mobilefirst和ionic制作了一個應用程序,當我嘗試在模擬器或智能手機上運行該應用程序時,出現以下錯誤:
Error: BUILD FAILED
D:\Android_SDKs\tools\ant\build.xml:597: The following error occurred while executing this line:
D:\Android_SDKs\tools\ant\build.xml:716: The following error occurred while executing this line:
D:\Android_SDKs\tools\ant\build.xml:730: Compile failed; see the compiler error output for details.
Total time: 1 second
D:\work\MobileFirstProjects\projects\TestCordova\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,D:\work\MobileFirstProjects\projects\TestCordova\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
我正在使用Java 8和ant 1.9.6。
謝謝
編輯:我已經將Java版本從8更改為7,錯誤仍然存在...
當我更改Java版本時有結果:
D:\work\MobileFirstProjects\projects\TestCordova>mfp cordova run
Searching for list of Devices...
? Which device id do you want to target? 5da2ac45 - Qualcomm RIL 1.0
Cordova config.xml currently configured with:
mfpServerUrl: http://192.168.78.240:10080
mfpServerRuntime: backend
MFP Command: mfp cordova run --platform android --target "5da2ac45"
Building and Deploying android application prior to running...
Error: BUILD FAILED
D:\Android_SDKs\tools\ant\build.xml:597: The following error occurred while executing this line:
D:\Android_SDKs\tools\ant\build.xml:716: The following error occurred while executing this line:
D:\Android_SDKs\tools\ant\build.xml:730: Compile failed; see the compiler error output for details.
Total time: 3 seconds
D:\work\MobileFirstProjects\projects\TestCordova\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,D:\work\MobileFirstProjects\projects\TestCordova\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
D:\work\MobileFirstProjects\projects\TestCordova>java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
您可能需要按照此博客文章中的說明進行操作,提供有關如何在與Ionic集成的MobileFirst Platform Foundation 7.1中創建Cordova應用程序的詳細信息: https ://www.raymondcamden.com/2015/08/19/developing- ionic-apps-with-mobilefirst-7-1 /
實質上:
www
資產 請參考以下鏈接,
https://github.com/csantanapr/mfp-ionic-templates它將幫助您將ionic與mfp 7.1版本集成。
實質上:
創建cordova項目並在那兒提供離子項目鏈接,例如,
$ mfp cordova create myapp -p ios,android -t ~/Downlaods/mfp-ionic-templates-master/tabs
$ cd myapp
$ npm install
它為我工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.