0

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

kishore kumar
  • 63
  • 3
  • 8

4 Answers4

0

You will find a lot of applications to read the Log of your installed Apps, but they require root permissions to display the exceptions.

Jorgesys
  • 124,308
  • 23
  • 334
  • 268
0

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.

AdamM
  • 162
  • 1
  • 8
0

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.

Community
  • 1
  • 1
Nathaniel D. Waggoner
  • 2,856
  • 2
  • 19
  • 41
0

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.

SMR
  • 6,628
  • 2
  • 35
  • 56