if its possible to see what type of run time exception in android mobile? because i developed one application which works fine in emulator but stop working in mobile.. is there any Log-cat.. [a Log-cat]: https://play.google.com/store/apps/details?id=org.jtb.alogcat&hl=en doesn't shows errors..! i cant find any tutorials for "a Log-cat" apk.. please help me!! Thanks in adavance
-
If you are executing from the command line, adb logcat {flags} will do it. Otherwise your IDE should have a built in LogCat. Are you using Eclipse or IntelliJ? – Nathaniel D. Waggoner Feb 15 '14 at 05:17
-
i'm running my own apk on my mobile.. its stops working , i want to check it out what type of exception it is – kishore kumar Feb 15 '14 at 05:39
-
Are you programming on your phone? Or ar eyou using a computer? – Nathaniel D. Waggoner Feb 15 '14 at 05:51
4 Answers
You will find a lot of applications to read the Log of your installed Apps, but they require root permissions to display the exceptions.

- 124,308
- 23
- 334
- 268
If you have the sdk tools installed you have access to the log cat from that if you run your apk while connected to the computer. If you use eclipse there is even a guy with easy access to it, otherwise there are command line tools.
In essence, plug it into your computer and you can get to the logs.

- 162
- 1
- 8
I would recommend you work through:
https://developer.android.com/training/basics/firstapp/index.html?hl=cn
As it will get you set up and teach you to use the tools. If you don't want to do that:
Command Line:
http://developer.android.com/tools/help/logcat.html
Eclipse:
How to enable LogCat/Console in Eclipse for Android? How to debug on a real device (using Eclipse/ADT)
IntelliJ
https://www.jetbrains.com/idea/webhelp/debugging-with-logcat.html
Short: Either root and use an application to view the log cat, or plug it into your computer.

- 1
- 1

- 2,856
- 2
- 19
- 41
you can try this code to view it
try{
//do something
}catch(Exception e){
Toast.makeText(context,e.message(),Toast.LENGTH_LONG).show();
//or you can start a new ACTIVITY and put STACKTRACE in a TextView
}
But this have a drawback that you should know that in which part of you app the Exception
may occur.
I have tried it using a Toast
. Hope it helps.

- 6,628
- 2
- 35
- 56