當前位置:編程學習大全網 - 網站源碼 - AppComponentFactory副本

AppComponentFactory副本

AndroidStudio報告了壹個錯誤。android:appComponentFactory

com . Android . support:support-compat:28 . 0 . 0與androidx.core:core:1.0.0沖突。

嘗試方法1:

在AndroidManifest.xml中添加工具:replace = " Android:appcomponentfactory "

並在上面加壹行Android:appcomponentfactory = " whatever string ",(任意字符)。仍然報告錯誤。

方法二:(沒試過)

放支架-& gt;AndoridX,變化太大了。

方法三:

在gradle.properties中添加android.useAndroidX=true和android.enableJetifier=true

因為我的項目不是因為主項目報錯,而是因為第三方庫。沒有效果

方法四:(解決方案)

Mac,以如下方式執行

。/gradlew :app:dependencies,找到依賴androidx的第三方庫,修改。

Windows執行gradlew :app:dependencies並查看依賴庫。

第三方庫使用+而不是googlePlayServicesVersion,導致加載最新的androidx。

實現" com . Google . Android . GMS:play-services-GCM:$ { safe extget(' googlePlayServicesVersion ',' 16.1.0')} "

換壹個具體的版本,好的。

  • 上一篇:伽師源代碼
  • 下一篇:電腦程序是什麽?
  • copyright 2024編程學習大全網