- gradle :7.2.0
- agp:7.0.0
then the AS will threw an exception:
NextHost requires ASM7.
- fork arouter代码
- 全局替换Opcodes.ASM5 为 Opcodes.ASM7
- 执行 publish.uploadArchives() 在build/localMaven下会生成二进制Plugin插件
- 添加本地maven仓库地址
maven {
url = "${rootProject.getPath()}/../localMaven"
}
dependencies {
...
classpath 'com.alibaba:arouter-register-asm7:1.0.2'
...
}
使用步骤:
- 1 把项目中的 "归档.zip" 解压 复制到 根目录下面
- 2 在项目的build.gradle添加本地仓库地址
maven {
url = "${rootProject.getPath()}/../(1中解压的localMaven路径)"
}
dependencies {
...
//删除原先的classpath "com.alibaba:arouter-register:$arouter_register_version"
//使用我们刚刚/localMaven下的新jar包
classpath 'com.alibaba:arouter-register-asm7:1.0.2'
...
}