迁移到AndroidX报错Program type already present: androidx.annotation xxx
生活随笔
收集整理的這篇文章主要介紹了
迁移到AndroidX报错Program type already present: androidx.annotation xxx
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
最近將項目中使用的support庫遷移到AndroidX了,其中遇到了幾處報錯,其中大部分錯誤在網上都能找到,現在我只把網上搜索不到解決方法的錯誤分享一下。遷移成功后,運行項目時報錯:Program type already present: androidx.annotation xxx,解決方案:在app's build.gradle中添加
configurations {compile.exclude group: 'androidx.annotation', module: 'annotation' } 即可,如下所示: android {//bla bla bla }configurations {compile.exclude group: 'androidx.annotation', module: 'annotation' }dependencies { // bla bla bla }總結
以上是生活随笔為你收集整理的迁移到AndroidX报错Program type already present: androidx.annotation xxx的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: RocketMQ生产者组topic和消费
- 下一篇: 仙童传奇-半导体的奇迹