Java Code Examples for com.alibaba.android.arouter.launcher.ARouter#printStackTrace()

The following examples show how to use com.alibaba.android.arouter.launcher.ARouter#printStackTrace() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MyAppLifecycles.java    From LQRBiliBlili with MIT License 5 votes vote down vote up
private void initARouter(Application application) {
    if (BuildConfig.LOG_DEBUG) {
        ARouter.openDebug();
        ARouter.openLog();
        ARouter.printStackTrace(); // 打印日志的时候打印线程堆栈
    }
    ARouter.init(application);
}
 
Example 2
Source File: AppContext.java    From star-zone-android with Apache License 2.0 4 votes vote down vote up
public static void initARouter() {
    ARouter.openLog();
    ARouter.openDebug();
    ARouter.printStackTrace();
    ARouter.init(getAppInstance());
}
 
Example 3
Source File: CommonApplicationLike.java    From AcgClub with MIT License 4 votes vote down vote up
@Override
public void onCreate() {
  mAppComponent = DaggerAppComponent
      .builder()
      .appModule(new AppModule(mApplication))////提供application
      .clientModule(new ClientModule())//用于提供okhttp和retrofit的单例
      .imageModule(new ImageModule())//图片加载框架默认使用glide
      .globeConfigModule(getGlobeConfigModule(mApplication, mModules))//全局配置
      .build();
  mAppComponent.inject(this);
  Utils.initAppComponent(mAppComponent);

  //router
  if (BuildConfig.DEBUG) {
    ARouter.openLog();
    ARouter.openDebug();
    ARouter.printStackTrace();
  }
  ARouter.init(mApplication);

  //db init
  Realm.init(mApplication);

  //init utils
  Utils.init(mApplication);

  //log
  LogUtil.init(BuildConfig.DEBUG);

  //loadsir init
  LoadSir.beginBuilder()
      .addCallback(new LoadingCallback())
      .addCallback(new EmptyCallback())
      .addCallback(new EmptyCollectionCallback())
      .addCallback(new PlaceholderCallback())
      .addCallback(new RetryCallback())
      .setDefaultCallback(LoadingCallback.class)
      .commit();

  mApplication.registerActivityLifecycleCallbacks(mActivityLifecycle);

  for (ConfigModule module : mModules) {
    module.registerComponents(mApplication, mAppComponent.repositoryManager());
  }

  for (Lifecycle lifecycle : mLifecycles) {
    lifecycle.onCreate(mApplication);
  }

  //初始化全局dialog
  StyledDialog.init(mApplication);

  //leakCanary内存泄露检查
  //LeakCanary.install(mApplication);

  //rx全局异常处理
  setRxJavaErrorHandler();
}