如何使用离子框架与角度的apk文件 [英] How to make apk file using ionic framework with angular
问题描述
我在本地目录中创建了简单的应用程序,该应用程序名称是Ionic-Chat-master
如何将此文件设为apk文件?
我使用git尝试了下面的命令但是没有为我工作
g cordova
cordova build --release android
这会显示错误 sh.exe:cordova:command not found
如果你想使用Ionic FrameWork生成.apk,这很简单,为了讨论,我创建了示例应用程序,并使用 Ionic Command 将该示例应用程序转换为.apk。
创建Ionic示例应用程序。
$ ionic start Ionic-Chat-master
添加平台到该项目
b
$ b
C:\Ionic-Chat-master>离子平台add ios
和 android
C:\Ionic-Chat-master> ionic platform add android
/ p>
C:\Ionic-Chat-master>离子运行ios -l -c
$>
<$ p $ <$ p $ <$> c> C:\Ionic-Chat-master> ionic run android -l -c
C:\Ionic-Chat -master> ionic build android
这些是可以实现 .apk 。
I have created simple apps in local directory, that app name is Ionic-Chat-master
How can i make this to apk file?
i have tried the following command using git but not worked for me
npm install -g cordova
cordova build --release android
This displays an error (sh.exe": cordova: command not found
).
If you want generate .apk using Ionic FrameWork . thats very simple for the sake of this discussion I created the sample app and convert that sample app in to .apk using Ionic Command.
1.Create a Ionic Sample App,
$ionic start Ionic-Chat-master
2.Adding a platform to that project
for ios
C:\Ionic-Chat-master>ionic platform add ios
and for android
C:\Ionic-Chat-master>ionic platform add android
3.Previewing on a mobile device(Be Sure your device is Connected)
for ios
C:\Ionic-Chat-master>ionic run ios -l –c
for android
C:\Ionic-Chat-master>ionic run android -l –c
4.Deploy to an android device
C:\Ionic-Chat-master>ionic build android
These are the Commands which leads to achieve a .apk .
这篇关于如何使用离子框架与角度的apk文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!