美文网首页
Android开发之ARouter错误记录: There is

Android开发之ARouter错误记录: There is

作者: 南风知我咦 | 来源:发表于2023-05-09 20:13 被阅读0次
使用ARouter时出现: There is no route match the path错误
  • 产生原因:
    • 1.不同的moudle必须使用不同的层级目录/app/xxx和/login/xxxx这样的
    • 2.应用的moudle必须互相依赖,我在app跳转到login中,app必须依赖login,没有依赖会失败
    • 3.跳转和页面的注解是否正确,你跳转写的和页面添加不一样可能出错
    • 4.每个模块的build.gradle中必须添加相应的设置,如下
annotationProcessor 'com.alibaba:arouter-compiler:1.2.2'
 //路由注册module 名称
 javaCompileOptions {
 annotationProcessorOptions {
 includeCompileClasspath true
 arguments = [AROUTER_MODULE_NAME: project.getName()]
 }
 }

相关文章

网友评论

      本文标题:Android开发之ARouter错误记录: There is

      本文链接:https://www.haomeiwen.com/subject/agfdsdtx.html