The given artifact contains a string literal with a package reference ‘android.support.v4.content‘

The given artifact contains a string literal with a package reference ‘android.support.v4.content‘,第1张

编译时遇到,The given artifact contains a string literal with a package reference ‘android.support.v4.content’ that cannot be safely rewritten.Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.

原因:

android build.gradle文件中引用的某个库,版本太旧,而工程的minSDK是androidx以上。

解决

将对应的库,更新到最新版本

我的错误库版本是: 原本

annotationProcessor ‘com.jakewharton:butterknife-compiler:8.8.1’

换成

implementation ‘com.jakewharton:butterknife:10.2.1’
annotationProcessor ‘com.jakewharton:butterknife-compiler:10.2.1’

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/926633.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-16
下一篇 2022-05-16

发表评论

登录后才能评论

评论列表(0条)

保存