Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法捕捉所有活动的应用程序错误?例如,在应用程序级别。就像是
public class MyApp extends Application { ... catch error ... }
谢谢
用于Thread.setDefaultUncaughtExceptionHandler()注册一个异常处理程序,当您在本地未处理的任何地方发生异常时将触发该异常处理程序。
Thread.setDefaultUncaughtExceptionHandler()