ARouter::There|ARouter::There is no route match the path
ARouter:https://github.com/alibaba/ARouter
在使用服务时会提示找不到路由路径,但是已经按照官网提示的配置好了路径。
原因:可能是配置出现问题。
在模块化开发时需要在各个模块的build.gradle里都要配置
defaultConfig {
...javaCompileOptions {
annotationProcessorOptions {
arguments = [moduleName: project.getName()]
}
}}dependencies {
...annotationProcessor 'com.alibaba:arouter-compiler:1.1.4'
implementation project(':base')//base模块里添加依赖}
同时base模块里
dependencies {
...
compile ('com.alibaba:arouter-api:1.3.1'){ exclude group: 'com.android.support' }
//implementation 'com.alibaba:arouter-api:1.3.1'}
注意:导入arouter-api时可能出现V4包版本不一致,如下异常,所以将其屏蔽
Error:Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.android.support:support-v4' has different version for the compile (25.2.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution
【ARouter::There|ARouter::There is no route match the path】虽然编译没有问题,但是在运行时可能出现异常
com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lcom/alibaba/android/arouter/routes/ARouter$$Group$$user;
解决方法:https://www.jianshu.com/p/c47db5f33d5f
推荐阅读
- ARouter之基础应用篇
- react+typescript+router框架搭建笔记
- Vue|vue-router 详解
- vue-router|vue-router 由hash更换为history模式
- react-router4升级
- react-router|react-router 源码阅读
- vite+vue3+vue-router项目中vue-router报错的问题
- MongoDB 命令大全
- Ethereumledger以太账本高频交易平台11月7日报告
- react基础学习之路由篇(react-router-dom)