i had build the ionic project (sample in 'www' folder) and run the sample in browser. but i need to convert the sample/project in to android app, and want to test that sample in my android phone. please provide what are all the software needed to do this and what are all the step by step procedure.
2 Answers
You will need the Android SDK to compile Android code. Set ANDROID_HOME environment variable to the SDK location.
On windows: set ANDROID_HOME=/path/to/sdk
From the command line, run the following command which generates an Android project:
ionic add platform android
Then build an apk file using this command:
ionic build android
Copy the apk to an Android device for testing.

- 810
- 10
- 19
The next step after starting an ionic project and building the app is deployment.
Make sure your device connected to your machine. Make sure android ionic support is enabled via $ionic platform add android
. Check that android is supported via $ionic platform list
.
Then build your app.
$ionic build android
and run it $ionic run android
This should run to the connected device to test. You can also use emulators by adjusting the run syntax.

- 3,237
- 2
- 17
- 26