Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make apk file using ionic framework with angular

Tags:

cordova

ionic

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).

like image 603
Vijaya Kumar Avatar asked Aug 05 '15 14:08

Vijaya Kumar


2 Answers

The easiest way, no need to install anything:

ionic package build android

(magic happens in the cloud)

Then you can download .apk to a computer or your Android device.

like image 65
Mars Robertson Avatar answered Oct 26 '22 06:10

Mars Robertson


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 .

like image 42
SakthiSureshAnand Avatar answered Oct 26 '22 06:10

SakthiSureshAnand