alibaba / ARouter

💪 A framework for assisting in the renovation of Android componentization (帮助 Android App 进行组件化改造的路由框架)
Apache License 2.0
14.45k stars 2.61k forks source link

com.android.tools.build:gradle:7.3.0最新稳定版报错了 #1023

Closed lydlovezjr closed 6 months ago

lydlovezjr commented 2 years ago

Execution failed for task ':app:transformClassesWithCom.alibaba.arouterForDebug'.

java.lang.ArrayIndexOutOfBoundsException

lydlovezjr commented 2 years ago

Task :app:transformClassesWithCom.alibaba.arouterForDebug FAILED

Execution failed for task ':app:transformClassesWithCom.alibaba.arouterForDebug'.

java.lang.ArrayIndexOutOfBoundsException

lydlovezjr commented 2 years ago

arouter-api | arouter-compiler | arouter-register都是最新的版本

lany192 commented 2 years ago

同上

feicien commented 2 years ago

Android Gradle Plugin 7.2.2 正常的,升级到 7.3.0 就会出现这个问题

licoba commented 2 years ago

加一,确实是同样的报错

YuYongzhi commented 1 year ago

+1,是不是官方不打算支持 gradle 7.3.0了?两年没发布新版本了

972223177 commented 1 year ago

+1,是不是官方不打算支持 gradle 7.3.0了?两年没发布新版本了

+1,阿里的库真的慎用,很多都不维护了。

jadepeakpoet commented 1 year ago

我fork了一个版本,修正了此bug,适配了AGP7.3.0,发布到了jitpack,如果官方没动静,后续我应该会继续适配AGP8.0,感兴趣可以看下

地址: https://github.com/jadepeakpoet/ARouter

这个问题的原因是解析的时候,因为兼容性问题,解压jar的时候,把文件夹当成class文件来解析,所以报错了

tangdi0802 commented 1 year ago

+1 7.3.0使用kapt注解处理器会报错,

tangdi0802 commented 1 year ago

可以运行,我之前配置错了

diandian8801 commented 1 year ago

可以运行,我之前配置错了

遇到了同样的问题,求解配置错误处在哪里呢?

hw1989 commented 1 year ago

我也遇到了,我改了下配置顺序, 开始 id 'com.android.application' 是在最上面,放到最下面就OK了 plugins { id 'org.jetbrains.kotlin.android' id 'kotlin-android' id 'kotlin-kapt' id 'com.alibaba.arouter' id 'com.android.application' }

ahzar commented 1 year ago

你发过来的邮件怎么都是乱码啊,什么都看不到,再发一次吧。

GreysonHop commented 1 year ago

我也遇到了,我改了下配置顺序, 开始 id 'com.android.application' 是在最上面,放到最下面就OK了 plugins { id 'org.jetbrains.kotlin.android' id 'kotlin-android' id 'kotlin-kapt' id 'com.alibaba.arouter' id 'com.android.application' }

参考你的方法,我的也没问题了!感谢。我修改后的代码如下,原本'com.android.application'是在最上面!: apply plugin: 'com.huawei.agconnect' apply plugin: 'com.alibaba.arouter' apply plugin: 'com.android.application' apply plugin: 'privacy-sentry-plugin' apply plugin: 'android-junk-code'

972223177 commented 1 year ago

诚聘网络兼职工资日结!还不错~ 详情请登陆招聘网站http://brorx.cn/?;

ahzar commented 1 year ago

你发过来的邮件怎么都是乱码啊,什么都看不到,再发一次吧。

danatechgithub4 commented 1 year ago

我也遇到了,我改了下配置顺序, 开始 id 'com.android.application' 是在最上面,放到最下面就OK了 plugins { id 'org.jetbrains.kotlin.android' id 'kotlin-android' id 'kotlin-kapt' id 'com.alibaba.arouter' id 'com.android.application' }

这个办法是瞎扯淡,> Task :app:transformClassesWithCom.alibaba.arouterForRelease

这个任务都没了。。。当然就不报错了。掩耳盗铃啊

ahzar commented 1 year ago

你发过来的邮件怎么都是乱码啊,什么都看不到,再发一次吧。