alibaba / ARouter

💪 A framework for assisting in the renovation of Android componentization (帮助 Android App 进行组件化改造的路由框架)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gradle 8.0构建项目报错API 'android.registerTransform' is removed.

ven-coder opened this issue · comments

commented

gradle 8.0 API 'android.registerTransform' is removed.这个api在8.0 gradle中被移除了,使用arouter构建插件报错,更新一下吧

会报错吗?我 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.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:?"
    }
}

AGP 8.0干掉了 transform,动态生成代码会失败的

commented

希望官方更新Arouter

有解决方案了吗?