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 b
We need to execute below mentioned steps to generate .apk with gradle build system:
Through out the steps I have assume that I am creating 'MyApp' project
Step 1 : generate myapp.keystore file using below mentioned command :
keytool -genkey -v -keystore myapp.keystore -alias myapp -keyalg RSA -keysize 2048 -validity 10000
Step 2 : create ant.properties file with following details :
storeFile=myapp.keystore
storePassword=<<your keystore password>>
keyAlias=myapp
keyPassword=<<your keystore password>>
Step 3 : create gradle.properties file with the path to set ant.properties file :
cdvReleaseSigningPropertiesFile= <<path to ant.properties>>
Step 4 : Use last command as mentioned below :
ionic build android --release
Note : You must have set path for : java, adb, jarsigner, zipalign
Your generated apk will be in build folder.
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 .
for ionic 3 add ionic login
enter email and pwd
then
ionic package build android
please login and check the apk file.
First of all you have to install
and then after all installation you have to set this all software path into environmental- variable. and then fire your npm install -g cordova
. without this all software installation and there path setup your phoneGap application will not created. and still you have any confusion and any question related software installation and there path setup then again tell me i will help you.
First create an account at Ionic Io ,
then in your project directory hit this - >
ionic io init
then log in there and hit this
ionic package build android
no need to install anything...
ionic platform add android
ionic build --release android