Android:导入module报错Android resource linking failed

本文介绍了在Android开发过程中遇到的一个问题,即在导入module时出现'Android resource linking failed'的错误。作者尝试了在主工程app的gradle中添加依赖的解决方案,但担心引发引用混淆。最终通过修改module中资源引用方式,成功解决了问题,避免了使用可能带来风险的临时解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今日将A工程(调试无问题)生成module导入B工程时报错,如下:

Android resource linking failed
Output:  W/ResourceType(16200): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1329)
W/ResourceType(16200): For resource 0x0101053e, entry index(1342) is beyond type entryCount(1329)
W/ResourceType(16200): For resource 0x0101053b, entry index(1339) is beyond type entryCount(1329)
W/ResourceType(16200): For resource 0x0101053c, entry index(1340) is beyond type entryCount(1329)
E:\WorkSpace\ASProjects\Task\demo\module_aiview\build\intermediates\packaged_res\release\layout\dialog_root.xml:9: error: attribute layout_constraintLeft_toLeftOf (aka com.xxx...(app包名):layout_constraintLeft_toLeftOf) not found.
E:\WorkSpace\ASProjects\Task\demo\module_aiview\build\intermediates\packaged_res\release\layout\dialog_root.xml:9: error: attribute layout_constraintTop_toTopOf (aka com.xxx...(app包名):layout_constraintTop_toTopOf) not found.
E:\WorkSpace\ASProjects\Task\demo\module_aiview\build\intermediates\packaged_res\release\layout\dialog_root.xml:19: error: attribute layout_constraintLeft_toLeftOf (aka com.xxx...(app包名):layout_constraintLeft_toLeftOf) not found.
E:\WorkSpace\ASProjects\Task\demo\module_aiview\build\intermediates\packaged_res\release\layout\dialog_root.xml:19: error: attribute layout_constraintTop_toBottomOf (aka com.xxx...(app包名):layout_constraintTop_toBottomOf) not found.
E:\WorkSpace\ASProjects\Task\demo\module_aiview\build\intermediates\packaged_res\release\layout\view_weather_page_first.xml:8: error: attribute layout_constraintLeft_toLeftOf (aka com.xxx...(app包名):
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值