android debug
Post on 02-Jan-2016
45 Views
Preview:
DESCRIPTION
TRANSCRIPT
-
Android Debug2012/4
-
DebugEclipse(snippetslog)()AlertDialogToastAndroidManifest.xml
-
Android DebugEclipseLogCatConsole, ProblemsLogcatToastAlterDialog log+LogCatTryCatch
-
EclipseConsole, Problems
-
EclipseLogCat1
-
EclipseLogCatLogCatConsoleJava Code
-
?
-
Eclipse
-
-ToastToast.makeText(this, , Toast.LENGTH_SHORT).show();
-
- AlterDialognew AlertDialog.Builder(this) .setTitle(") .setMessage() .setPositiveButton("",new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub } }) .show();import android.app.AlertDialog;import android.content.DialogInterface;
-
log+LogCat(Verbose)(Debug)(Info)(Warning)(Error)
-
log+LogCatLog v, d, i, w, e()vdLogCat Tag LogCat Message Log.v("MyMessage", "This line was executed.");Log.e("MyMessage", "submit is null.");import android.util.Log;
-
log+LogCat
-
log+LogCatLogCat
-
TryCatchtry{
}catch(Exception e){ Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
-
breakpoint
-
Display
-
CTRL + SHIFT + DCTRL + SHIFT + DDisplayF6
-
ALT + SHIFT + ALT +SHIFT +
-
import android.os.Debug;WRITE_EXTERNAL_STORAGE permissionDebug.startMethodTracing( "traceFileName" ); Debug.stopMethodTracing( );adb pull /sdcard/traceFileName.trace .
traceview \traceFileName.tracesdcard
-
traceview \traceFileName.trace1.Name: 2.Incl:inclusive 3.Inclusive: . 4.Excl: 5.Exclusive: 6.Calls+Recur Calls/Total: 7.Time/Call: (ms)
top related