We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Android路由框架,基于平台化解耦的思想,服务于组件化间通信
⚠️表示虽然支持,但是使用繁琐复杂
1.1 根目录下的build.gradle下添加插件依赖
buildscript { dependencies { classpath "io.github.didi:drouter-plugin:x.x.x" } }
1.2 在application module中应用插件
apply plugin: 'com.android.application' apply plugin: 'com.didi.drouter'
1.3 添加Java代码依赖
dependencies { api "io.github.didi:drouter-api:2.4.5" }
1.4 无需添加混淆规则
DRouter.init(application);
可以把debug的apk拖到AndroidStudio里看看有没有目标类 遇到找不到目标的问题可能只是因为没有把module引入进来,比如 api project(':xxx')
apply plugin: 'com.didi.drouter' drouter { debug = true } 编译时会有DRouter相关的日志打印 可以看到路由表,可以看到哪些类用到了DRouter,检查是否有异常
Logcat中抓取 DRouterCore 关键字