How to make apk file using ion frame with angular

I created simple applications in the local directory, this is the name of the application Ionic-Chat-master

How can I do this with apk file?

I tried the following command using git but didn't work for me

npm install -g cordova cordova build --release android 

An error message sh.exe": cordova: command not found ( sh.exe": cordova: command not found ).

+7
cordova ionic
source share
7 answers

If you want to generate .apk using Ionic FrameWork. It is very simple for this discussion. I created a sample application and converted this sample application to .apk using Ionic Command .

1.Create an Ionic Sample application,

 $ionic start Ionic-Chat-master 

2. Adding a platform to this project

for ios

 C:\Ionic-Chat-master>ionic platform add ios 

and for android

 C:\Ionic-Chat-master>ionic platform add android 

3.See on your mobile device (make 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 for android device

 C:\Ionic-Chat-master>ionic build android 

These are the Teams that lead to achieving .apk .

+23
source share

First of all, you must install

  • node.js
  • apache ANT
  • Java JDK and JRE
  • Android SDK and Eclipse

and then after installation you should set this entire program path to the environment variable. and then run your npm install -g cordova . without it, all the software installations and there the setup path your phoneGap application will not be created. and still you have some kind of confusion and any problem with installing the software, and there the path setup will again tell me that I will help you.

+5
source share

The easiest way: nothing to install:

ionic package build android

(magic happens in the cloud)

You can then download the .apk to your computer or Android device.

+2
source share

First create an account in Ionic Io,

then in the project directory click this →

 ionic io init 

log in and click

 ionic package build android 

no need to install anything ...

+1
source share

We need to follow the steps below to create .apk with gradle build system:

As part of the steps, I assume that I am creating a project "MyApp"

Step 1: generate the myapp.keystore file using the following command:

 keytool -genkey -v -keystore myapp.keystore -alias myapp -keyalg RSA -keysize 2048 -validity 10000 

Step 2: create an ant.properties file with the following data:

 storeFile=myapp.keystore storePassword=<<your keystore password>> keyAlias=myapp keyPassword=<<your keystore password>> 

Step 3: create the gradle.properties file with the path to the ant.properties file:

 cdvReleaseSigningPropertiesFile= <<path to ant.properties>> 

Step 4: use the last command as follows:

 ionic build android --release 

Note. You must set the path for: java, adb, jarsigner, zipalign

Your generated apk will be in the build folder.

0
source share

for ionic 3 add ionic login enter email and pwd then

 ionic package build android 

log in and check the apk file.

0
source share
 ionic platform add android ionic build --release android 
-one
source share

All Articles