1、作为application运行的module必须依赖所有要跳转页面所属的module
2、ARouter.init(this); 必须在下面的代码之后
ARouter.openLog(); // 打印日志 ARouter.openDebug(); // 开启调试模式(如果在InstantRun模式下运行,必须开启调试模式!线上版本需要关闭,否则有安全风险) ARouter.printStackTrace();
若不按上方配置会在跳转时报“ARouter::There is no route match the path”。
3、定义拦截器后拦截器的process方法默认是会拦截所有跳转操作的,想正常跳转需要在方法中加
callback.onContinue(postcard);
若有条件的拦截可以在条件判断中写
callback.onInterrupt(null); 本语句的作用就是拦截跳转并报出异常,参数为Exception对象。