使用ARouter 时 提示 There’s no route matched
如果使用使用ARouter 时 提示 There’s no route matched 这个错误时
并且检查跳转url 配置对 的情况下:
需要每个Module中都增加配置如下
android {
defaultConfig {
...
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
}
dependencies {
// 替换成最新版本, 需要注意的是api
// 要与compiler匹配使用,均使用最新版可以保证兼容
compile 'com.alibaba:arouter-api:x.x.x'
annotationProcessor 'com.alibaba:arouter-compiler:x.x.x'
...
}