gradle 8.0构建项目报错API 'android.registerTransform' is removed.
ven-coder opened this issue · comments
Ven commented
gradle 8.0 API 'android.registerTransform' is removed.这个api在8.0 gradle中被移除了,使用arouter构建插件报错,更新一下吧
Jack.D commented
会报错吗?我 AGP 升级到 8.0.2 看上去没什么问题呢?
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
}
implementation 'com.alibaba:arouter-api:1.5.2'
kapt 'com.alibaba:arouter-compiler:1.5.2'
afxstar commented
会报错吗?我 AGP 升级到 8.0.2 看上去没什么问题呢?
plugins { id 'com.android.application' version '8.0.2' apply false id 'com.android.library' version '8.0.2' apply false id 'org.jetbrains.kotlin.android' version '1.7.20' apply false } implementation 'com.alibaba:arouter-api:1.5.2' kapt 'com.alibaba:arouter-compiler:1.5.2'
应该是这个没有适配agp 8.0导致的
apply plugin: 'com.alibaba.arouter'
buildscript {
repositories {
mavenCentral()
}
dependencies {
// Replace with the latest version
classpath "com.alibaba:arouter-register:?"
}
}
moten commented
AGP 8.0干掉了 transform,动态生成代码会失败的
jan commented
希望官方更新Arouter
xinghanchang commented
有解决方案了吗?