官网上和很多教程上都是说推荐在application中初始化ARouter,但是不清楚这段代码应该贴在哪里,什么是application?

if (isDebug()) {           // These two lines must be written before init, otherwise these configurations will be invalid in the init process
   ARouter.openLog();     // Print log
   ARouter.openDebug();   // Turn on debugging mode (If you are running in InstantRun mode, you must turn on debug mode! Online version needs to be closed, otherwise there is a security risk)
}
ARouter.init(mApplication); // As early as possible, it is recommended to initialize in the Application


  • vicky    2020-03-30 13:38:07
  • 阅读 786    收藏 0    回答 1
  • 邀请
  • 收藏
  • 分享
发送
登录 后发表评论
  • 51testing软件测试圈微信