Help the newbie learn the best practices of Eclipse / Android

I am new to Android and the Eclipse development environment and would like to consult the best practices for debugging my applications when they drop Force Close.

I researched ADB, however I cannot get this to interact with my phone, although I explicitly turned the debug mode to true on my test phone.

Obviously, Android comes with the LOG method, which I saw in many sample applications, can someone explain how to quickly view these logs and how to properly configure logging to determine the reason for the forced closure (always happens when I click the Home button ").

Any tips for efficient debugging in Eclipse would be greatly appreciated!

Regards, Ryan

+5
source share
2 answers

To debug from your device, you will need to enable debug mode (which sounds like it is), then you need to connect the phone to the USB connector. From here you can run Eclipse to run / debug.

Eclipse should ask which device to use (this is done because several devices must be available to start / debug, since your device is connected). At this point, you can select your actual device from the list, and you should be operational.

If you use android.util.Log, your logs will be displayed in LogCat. If you do not see LogCat by default in your Eclipse environment, you can add it by following these steps:

→ →
Android → LogCat
Cick OK.

/ LogCat.

+5

Eclipse LogCat, , :
: "adb -d logcat"
, Windows , 2 .
, , , Windows Linux Mac.
, ( doc ), .

0

All Articles