Friday, April 11, 2014

Android app emulator for pc



The Android app emulator is really good to do some pre-testing of android apps before installing it on your device.After all you do not want to cause your mobile to crash :P

The Android app emulator really takes some time to startup and be fully functional. Startup time ranges between 5-10min as it has to load all associated functions that might be invoked.

Emulator started at 5.47pm


Fully functional emulator at 5.52pm

Once launched, you can use it just as you use the app on the mobile device. Mobile app testing signoff should always be done on using targeted devices.

Once launched properly, you should see logs similar to the ones below:
[2014-04-06 17:53:20 - TestApp] Android Launch!

[2014-04-06 17:53:20 - TestApp] adb is running normally.


Installing an apk file through Eclipse or from command line, should produce logs similar as the ones below:
[2014-04-06 17:53:25 - TestApp] Uploading TestApp.apk onto device 'emulator-5554'

[2014-04-06 17:53:26 - TestApp] Installing TestApp.apk...

[2014-04-06 17:53:37 - TestApp] Success!

[2014-04-06 17:53:37 - TestApp] Starting activity com.bertie.testapp.MainActivity on device emulator-5554

[2014-04-06 17:53:41 - TestApp] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.xyz.testapp/.MainActivity }


Troubleshooting tips:

1) Installation error, Launch failed on device, etc
This means that the android emulator is still not fully operational and you are trying to deploy/install an app on it. You will get something like the below error logs
[2014-04-06 18:10:47 - MainActivity] Installation error: Unknown failure
[2014-04-06 18:10:47 - MainActivity] Please check logcat output for more details.
[2014-04-06 18:10:47 - MainActivity] Launch failed on device: AVD_for_Nexus_5_by_Google

2) No active compatible AVD's or devices found
This means that the emulator is not running or is not responding
[2014-04-12 10:40:47 - WebView] Performing com.example.android.webview.MainActivity activity launch
[2014-04-12 10:40:47 - WebView] No active compatible AVD's or devices found. Relaunch this configuration after connecting a device or starting an AVD.

No comments: