使用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'
...
}