Skip to content
xiaojinzi123 edited this page Jun 26, 2019 · 40 revisions

Foreword

Welcome to Component Wiki, Here you will get more infomation aboat Component.

If you have some questions after reading, please commit your issue.

Here will describe how to set up project with least code.

Config

If you use Androidx, please see Dependence and Config AndroidX_en Not AndroidX please see Dependence and Config

Use Annotation to mark Activity

进阶配置请查看 RouterAnno注解

@RouterAnno( host = "app", path = "info" ) public class InfoAct extends AppCompatActivity { // ...... }

First Routering

More usage please see Code routering or Api routering

Router.with(context)
      .host("app")
      .path("info")
      .navigate();

Routering fail?

  • reason1:you forget to add Annotation Processor, please see 配置注解驱动器
  • reason2:you forget to register other business Modules, please see App中加载对应的模块
  • reason3:the name you register in applicaiton is different from you config in build.gradle of your module
  • reason4:the host and path you used is different from target Activity's host and path
  • reason5:you can look for the reason in Logcat , Component will output error info at Debug level.
Clone this wiki locally