开发者

Reporting stack traces from ADT emulator

开发者 https://www.devze.com 2023-01-25 20:45 出处:网络
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

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

精彩评论

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