Tuesday, April 3, 2012

What is LogCat in Android and how can I see logs?

As normal, immediately after starting Android development, I begun editing files directly and in the same speed, I got an error which refer to something called logcat? Error shown was as follows in the console window.

[2012-03-03 12:04:00 - HelloAndroid] Installing HelloAndroid.apk...
[2012-03-03 12:04:01 - HelloAndroid] Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
[2012-03-03 12:04:01 - HelloAndroid] Please check logcat output for more details.
[2012-03-03 12:04:01 - HelloAndroid] Launch canceled!
[2012-03-03 12:05:26 - HelloAndroid] ------------------------------

This says something happened while deploying the app to the emulator / device .But for details I need to check something called logcat ? Where is that LogCat located ?

It is another window related to Android development in Eclipse .You can show that as follows.

Widnow -> Show View -> LogCat (with the Android logo)

If you are not able to locate in the show view sub menu select

Window -> Show View -> Others -> Android -> LogCat

This windows is just an UI to see the logs. You can even read and write to the logs. It is little difficult to understand the LogCat messages at first. But will be familiar with no time. My issue was I edited the name of an activity which was mentioned as the Launcher in AndroidManifest.xml. So make sure while renaming the activity modify your manifest as well.

No comments: