开发者

Reporting stack traces from ADT emulator

Does anyone know how to print stack traces for exceptions caught while running in the Android emulator in Eclipse? I catch the exception and call .p开发者_C百科rintStackTrace() but I cannot find where it is being written. I have tried .printStackTrace(System.out) and .printStackTrace(System.err). I would be nice to be able to direct them to the Eclipse console.


Use logcat. System.out and System.err are redirected to logcat in Android. Just go to Window -> Show View -> Other -> Android -> Logcat and you'll get all the logged stuff there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜