Ionic Html5编译IOS Android原生应用
Winndows环境下使用Ionic编译Html5应用成Android(网络最好能访问国外网站) 1.准备Android运行环境(百度) 配置path=D:\mysoftware\adt-bundle-windows-x86_64-20140321\sdk\platform-tools; D:\mysoftware\adt-bundle-windows-x86_64-20140321\sdk\tools 2.安装Node.js(Node.js是一个工具,安装后使用它安装Ionic) 3.npm install -g cordova ionic(安装好了Node.js后,在dos中输入命令安装ionic) 4.>ionic start myApp tabs >cd myApp >ionic platform add android >ionic build android >ionic emulate android 备注:Android SDK和Tools管理命令:android; Ionic官网安装文档:http://www.ionicframework.com/getting-started/; 安装错误记录: 1.Android环境没安装好错误: Running command: C:\Users\Administrator\myApp\platforms\android\cordova\build.bat [Error: Please install Android target: "android-22". Hint: Open the SDK manager by running: D:\mysoftware\adt-bundle-windows-x86_64-2 0140321\sdk\tools\android.BAT You will require: 1. "SDK Platform" for android-22 2. "Android SDK Platform-tools (latest) 3. "Android SDK Build-tools" (latest)] ERROR building one of the platforms: Error: C:\Users\Administrator\myApp\platfor ms\android\cordova\build.bat: Command failed with exit code 2 You may not have the required environment or OS to build this project Error: C:\Users\Administrator\myApp\platforms\android\cordova\build.bat: Command failed with exit code 2 at ChildProcess.whenDone (C:\Users\Administrator\AppData\Roaming\npm\node_mo dules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1015:16) at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。