anu_r
anu_r

Reputation: 1622

How to test Android app on an Android phone and get the error logs?

I am newbie to Android. I have been testing my apps on the emulator till date.
I want to do the following:

1. I have a Android phone and I wish to test my app on this phone.
2. I also want to know how to get the error logs while testing on the phone.

Thank you in advance.

Upvotes: 1

Views: 1935

Answers (2)

cesztoszule
cesztoszule

Reputation: 306

The phone has have a developer option and there select usb debbuging. And in you android code use Log.e(TAG,"error:" e.getMessage(),e); <- e is an Exception or for just normal debbuging use Log.d or Log.v Log.i

Upvotes: 0

pratiti-systematix
pratiti-systematix

Reputation: 812

You can run you android application directly from IDE, keeping 'Debug Mode' on within 'Developer Options' in 'Settings', and thus can trace logcat.

You may also need to install 'ADB Drivers' for the same.

Upvotes: 3

Related Questions