使用com.youth.banner.Banner插件报错InflateException的解决方案

在使用com.youth.banner.Banner插件时遇到InflateException,错误源于XML布局文件第10行。解决方法是检查build.gradle文件,确保dependencies中的material库版本为1.1.0或更高。由于使用gradle-6.1.1创建的项目可能默认material版本为1.0.0,导致与Banner不兼容,升级gradle到6.5及以上版本,或手动修改material库版本即可解决此问题。
摘要由CSDN通过智能技术生成

错误提示:

android.view.InflateException: Binary XML file line #10 in com.wwwwwy.msmartcity2:layout/activity_guide_banner_used_banner: Binary XML file line #10 in com.wwwwwy.msmartcity2:layout/activity_guide_banner_used_banner: Error inflating class com.youth.banner.Banner

android.view.InflateException: Binary XML file line #10 in activity_guide_banner_used_banner: Error inflating class com.youth.banner.Banner

布局

问题解决方法:

查看build.gradle文件,看看自己的dependencies中是否有这句

implementation 'com.google.android.material:material:1.0.0'

将其该改为

implementation 'com.google.and
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值