You must have at least one AVD (Android Virtual Device) configured on your development machine for this command to run your app up on an Android emulator. If you don’t have one installed currently go ahead and set one up now.

creating new virtual android emulator:

Open android sdk manager from start menu – You have installed as part of the pre-requiresites for NativeScript

Check all the system images are installed for future use or else click the install packages button at bottom right corner.

exports.loaded page binding is important for any parameter passing to work

login works from now

As a best practice, testing for a platform with an if check is the way to go when you have a small number of platform-specific changes to make. If, on the contrary, you have big, entirely different chunks of code for iOS and Android, you might want to go with platform-specific code-behind files—e.g. login.ios.js and login.android.js.