美文网首页
there is no route match

there is no route match

作者: 茶叶花 | 来源:发表于2019-07-31 15:10 被阅读0次

问题一

there is no route match

产生问题原因:

  1. 两个相同的模块,使用相同的一级路径。

  2. Java和kotlin 混合编程导致。
    纯Java

defaultConfig {
        javaCompileOptions {

            annotationProcessorOptions {

                arguments = [moduleName: project.getName()]
            }

        }

    }
dependencies {
      annotationProcessor  rootProject.ext.dependencies.arouter_compiler

}

纯kotlin或者kotlin+java

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

kapt {
    arguments {
        arg("moduleName", project.getName())
    }
    generateStubs = true
}


dependencies {
   kapt rootProject.ext.dependencies.arouter_compiler
}

问题2

These no module name,
产生问题原因:aroute 版本不同

低版本

kapt {

    arguments {

       arg("moduleNmae", project.getName())

    }

}

高版本

kapt {

arguments {

arg("AROUTER_MODULE_NAME", project.getName())

}

}

相关文章

    本文标题:there is no route match

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