当前位置:   article > 正文

【错误记录】Android Studio 集成 ARoute 编译报错 ( 兼容 support 库和 androidx 库 | add ‘tools:replace=“android:appCo )_tools:replace="android:appcomponentfactory

tools:replace="android:appcomponentfactory

一、报错信息

在 Android 项目中 , 集成 ARoute 后 , 报如下错误 ;

报错信息 :

  1. D:\002_Project\002_Android_Learn\Componentization\core\src\main\debug\AndroidManifest.xml:24:18-86 Error:
  2. Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.8.0] AndroidManifest.xml:24:18-86
  3. is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
  4. Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-20:19 to override.
  5. See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
  6. FAILURE: Build failed with an exception.
  7. * What went wrong:
  8. Execution failed for task ':core:processDebugMainManifest'.
  9. > Manifest merger failed with multiple errors, see logs

二、报错信息

执行

gradlew app:dependencies --configuration releaseRuntimeClasspath

命令 , 查看依赖 ;

  1. D:\002_Project\002_Android_Learn\Componentization>gradlew app:dependencies --configuration releaseRuntimeClasspath
  2. WARNING:: Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.
  3. This repository is deprecated and it will be shut down in the future.
  4. See http://developer.android.com/r/tools/jcenter-end-of-service for more information.
  5. Currently detected usages in: root project 'Componentization', project ':app', project ':base', ...
  6. > Task :app:dependencies
  7. ------------------------------------------------------------
  8. Project :app
  9. ------------------------------------------------------------
  10. releaseRuntimeClasspath - Runtime classpath of compilation 'release' (target (androidJvm)).
  11. +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10
  12. | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10
  13. | \--- org.jetbrains:annotations:13.0
  14. +--- androidx.core:core-ktx:1.8.0
  15. | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  16. | +--- androidx.core:core:1.8.0
  17. | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
  18. | | +--- androidx.annotation:annotation-experimental:1.1.0
  19. | | +--- androidx.collection:collection:1.0.0 -> 1.1.0
  20. | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  21. | | +--- androidx.concurrent:concurrent-futures:1.0.0
  22. | | | +--- com.google.guava:listenablefuture:1.0
  23. | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  24. | | +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.5.1
  25. | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  26. | | | +--- androidx.arch.core:core-common:2.1.0
  27. | | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  28. | | | +--- androidx.arch.core:core-runtime:2.1.0
  29. | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  30. | | | | \--- androidx.arch.core:core-common:2.1.0 (*)
  31. | | | \--- androidx.lifecycle:lifecycle-common:2.5.1
  32. | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  33. | | \--- androidx.versionedparcelable:versionedparcelable:1.1.1
  34. | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  35. | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
  36. | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)
  37. +--- androidx.appcompat:appcompat:1.5.1
  38. | +--- androidx.activity:activity:1.5.1
  39. | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  40. | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
  41. | | +--- androidx.core:core:1.8.0 (*)
  42. | | +--- androidx.lifecycle:lifecycle-runtime:2.5.1 (*)
  43. | | +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1
  44. | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  45. | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)
  46. | | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1 (c)
  47. | | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1
  48. | | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
  49. | | | +--- androidx.core:core-ktx:1.2.0 -> 1.8.0 (*)
  50. | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.5.1
  51. | | | | +--- androidx.arch.core:core-common:2.1.0 (*)
  52. | | | | +--- androidx.arch.core:core-runtime:2.1.0 (*)
  53. | | | | \--- androidx.lifecycle:lifecycle-common:2.5.1 (*)
  54. | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)
  55. | | | +--- androidx.savedstate:savedstate:1.2.0
  56. | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  57. | | | | +--- androidx.arch.core:core-common:2.1.0 (*)
  58. | | | | +--- androidx.lifecycle:lifecycle-common:2.4.0 -> 2.5.1 (*)
  59. | | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.7.10 (*)
  60. | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)
  61. | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1
  62. | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1
  63. | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.1
  64. | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.1
  65. | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1 (c)
  66. | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1 (c)
  67. | | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.1 (c)
  68. | | | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0
  69. | | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.7.10 (*)
  70. | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.0
  71. | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.7.10 (*)
  72. | | | | \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.0 -> 1.7.10
  73. | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.1 (*)
  74. | | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0 (*)
  75. | | +--- androidx.savedstate:savedstate:1.2.0 (*)
  76. | | +--- androidx.tracing:tracing:1.0.0
  77. | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  78. | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)
  79. | +--- androidx.annotation:annotation:1.3.0
  80. | +--- androidx.appcompat:appcompat-resources:1.5.1
  81. | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
  82. | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
  83. | | +--- androidx.core:core:1.6.0 -> 1.8.0 (*)
  84. | | +--- androidx.vectordrawable:vectordrawable:1.1.0
  85. | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  86. | | | +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
  87. | | | \--- androidx.collection:collection:1.1.0 (*)
  88. | | +--- androidx.vectordrawable:vectordrawable-animated:1.1.0
  89. | | | +--- androidx.vectordrawable:vectordrawable:1.1.0 (*)
  90. | | | +--- androidx.interpolator:interpolator:1.0.0
  91. | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
  92. | | | \--- androidx.collection:collection:1.1.0 (*)
  93. | | \--- androidx.appcompat:appcompat:1.5.1 (c)
  94. | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
  95. | +--- androidx.core:core:1.8.0 (*)
  96. | +--- androidx.core:core-ktx:1.8.0 (*)
  97. | +--- androidx.cursoradapter:cursoradapter:1.0.0
  98. | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
  99. | +--- androidx.drawerlayout:drawerlayout:1.0.0 -> 1.1.1
  100. | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  101. | | +--- androidx.core:core:1.2.0 -> 1.8.0 (*)
  102. | | \--- androidx.customview:customview:1.1.0
  103. | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  104. | | +--- androidx.core:core:1.3.0 -> 1.8.0 (*)
  105. | | \--- androidx.collection:collection:1.1.0 (*)
  106. | +--- androidx.emoji2:emoji2:1.2.0
  107. | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
  108. | | +--- androidx.collection:collection:1.1.0 (*)
  109. | | +--- androidx.core:core:1.3.0 -> 1.8.0 (*)
  110. | | +--- androidx.lifecycle:lifecycle-process:2.4.1
  111. | | | +--- androidx.lifecycle:lifecycle-runtime:2.4.1 -> 2.5.1 (*)
  112. | | | +--- androidx.startup:startup-runtime:1.1.1
  113. | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  114. | | | | \--- androidx.tracing:tracing:1.0.0 (*)
  115. | | | \--- androidx.annotation:annotation:1.2.0 -> 1.3.0
  116. | | \--- androidx.startup:startup-runtime:1.0.0 -> 1.1.1 (*)
  117. | +--- androidx.emoji2:emoji2-views-helper:1.2.0
  118. | | +--- androidx.collection:collection:1.1.0 (*)
  119. | | +--- androidx.core:core:1.3.0 -> 1.8.0 (*)
  120. | | \--- androidx.emoji2:emoji2:1.2.0 (*)
  121. | +--- androidx.fragment:fragment:1.3.6
  122. | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  123. | | +--- androidx.core:core:1.2.0 -> 1.8.0 (*)
  124. | | +--- androidx.collection:collection:1.1.0 (*)
  125. | | +--- androidx.viewpager:viewpager:1.0.0
  126. | | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
  127. | | | +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
  128. | | | \--- androidx.customview:customview:1.0.0 -> 1.1.0 (*)
  129. | | +--- androidx.loader:loader:1.0.0
  130. | | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
  131. | | | +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
  132. | | | +--- androidx.lifecycle:lifecycle-livedata:2.0.0
  133. | | | | +--- androidx.arch.core:core-runtime:2.0.0 -> 2.1.0 (*)
  134. | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0 -> 2.5.1 (*)
  135. | | | | \--- androidx.arch.core:core-common:2.0.0 -> 2.1.0 (*)
  136. | | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 -> 2.5.1 (*)
  137. | | +--- androidx.activity:activity:1.2.4 -> 1.5.1 (*)
  138. | | +--- androidx.lifecycle:lifecycle-livedata-core:2.3.1 -> 2.5.1 (*)
  139. | | +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.5.1 (*)
  140. | | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 -> 2.5.1 (*)
  141. | | +--- androidx.savedstate:savedstate:1.1.0 -> 1.2.0 (*)
  142. | | \--- androidx.annotation:annotation-experimental:1.0.0 -> 1.1.0
  143. | +--- androidx.lifecycle:lifecycle-runtime:2.5.1 (*)
  144. | +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)
  145. | +--- androidx.resourceinspection:resourceinspection-annotation:1.0.1
  146. | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  147. | +--- androidx.savedstate:savedstate:1.2.0 (*)
  148. | +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 (*)
  149. | \--- androidx.appcompat:appcompat-resources:1.5.1 (c)
  150. +--- com.google.android.material:material:1.6.1
  151. | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
  152. | +--- androidx.appcompat:appcompat:1.1.0 -> 1.5.1 (*)
  153. | +--- androidx.cardview:cardview:1.0.0
  154. | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
  155. | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0
  156. | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  157. | | +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
  158. | | +--- androidx.customview:customview:1.0.0 -> 1.1.0 (*)
  159. | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
  160. | +--- androidx.constraintlayout:constraintlayout:2.0.1 -> 2.1.4
  161. | | +--- androidx.appcompat:appcompat:1.2.0 -> 1.5.1 (*)
  162. | | +--- androidx.core:core:1.3.2 -> 1.8.0 (*)
  163. | | \--- androidx.constraintlayout:constraintlayout-core:1.0.4
  164. | +--- androidx.core:core:1.5.0 -> 1.8.0 (*)
  165. | +--- androidx.drawerlayout:drawerlayout:1.1.1 (*)
  166. | +--- androidx.dynamicanimation:dynamicanimation:1.0.0
  167. | | +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
  168. | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
  169. | | \--- androidx.legacy:legacy-support-core-utils:1.0.0
  170. | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
  171. | | +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
  172. | | +--- androidx.documentfile:documentfile:1.0.0
  173. | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
  174. | | +--- androidx.loader:loader:1.0.0 (*)
  175. | | +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
  176. | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
  177. | | \--- androidx.print:print:1.0.0
  178. | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
  179. | +--- androidx.annotation:annotation-experimental:1.0.0 -> 1.1.0
  180. | +--- androidx.fragment:fragment:1.2.5 -> 1.3.6 (*)
  181. | +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.5.1 (*)
  182. | +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0
  183. | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  184. | | +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
  185. | | +--- androidx.customview:customview:1.0.0 -> 1.1.0 (*)
  186. | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
  187. | +--- androidx.transition:transition:1.2.0
  188. | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  189. | | +--- androidx.core:core:1.0.1 -> 1.8.0 (*)
  190. | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
  191. | +--- androidx.vectordrawable:vectordrawable:1.1.0 (*)
  192. | \--- androidx.viewpager2:viewpager2:1.0.0
  193. | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
  194. | +--- androidx.fragment:fragment:1.1.0 -> 1.3.6 (*)
  195. | +--- androidx.recyclerview:recyclerview:1.1.0 (*)
  196. | +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
  197. | \--- androidx.collection:collection:1.1.0 (*)
  198. +--- androidx.constraintlayout:constraintlayout:2.1.4 (*)
  199. \--- com.alibaba:arouter-api:1.5.1
  200. +--- com.alibaba:arouter-annotation:1.0.6
  201. \--- com.android.support:support-v4:28.0.0
  202. +--- com.android.support:support-compat:28.0.0
  203. | +--- com.android.support:support-annotations:28.0.0
  204. | +--- com.android.support:collections:28.0.0
  205. | | \--- com.android.support:support-annotations:28.0.0
  206. | +--- android.arch.lifecycle:runtime:1.1.1
  207. | | +--- android.arch.lifecycle:common:1.1.1
  208. | | | \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
  209. | | +--- android.arch.core:common:1.1.1
  210. | | | \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
  211. | | \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
  212. | \--- com.android.support:versionedparcelable:28.0.0
  213. | +--- com.android.support:support-annotations:28.0.0
  214. | \--- com.android.support:collections:28.0.0 (*)
  215. +--- com.android.support:support-media-compat:28.0.0
  216. | +--- com.android.support:support-annotations:28.0.0
  217. | +--- com.android.support:support-compat:28.0.0 (*)
  218. | \--- com.android.support:versionedparcelable:28.0.0 (*)
  219. +--- com.android.support:support-core-utils:28.0.0
  220. | +--- com.android.support:support-annotations:28.0.0
  221. | +--- com.android.support:support-compat:28.0.0 (*)
  222. | +--- com.android.support:documentfile:28.0.0
  223. | | \--- com.android.support:support-annotations:28.0.0
  224. | +--- com.android.support:loader:28.0.0
  225. | | +--- com.android.support:support-annotations:28.0.0
  226. | | +--- com.android.support:support-compat:28.0.0 (*)
  227. | | +--- android.arch.lifecycle:livedata:1.1.1
  228. | | | +--- android.arch.core:runtime:1.1.1
  229. | | | | +--- com.android.support:support-annotations:26.1.0 -> 28.0.0
  230. | | | | \--- android.arch.core:common:1.1.1 (*)
  231. | | | +--- android.arch.lifecycle:livedata-core:1.1.1
  232. | | | | +--- android.arch.lifecycle:common:1.1.1 (*)
  233. | | | | +--- android.arch.core:common:1.1.1 (*)
  234. | | | | \--- android.arch.core:runtime:1.1.1 (*)
  235. | | | \--- android.arch.core:common:1.1.1 (*)
  236. | | \--- android.arch.lifecycle:viewmodel:1.1.1
  237. | | \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
  238. | +--- com.android.support:localbroadcastmanager:28.0.0
  239. | | \--- com.android.support:support-annotations:28.0.0
  240. | \--- com.android.support:print:28.0.0
  241. | \--- com.android.support:support-annotations:28.0.0
  242. +--- com.android.support:support-core-ui:28.0.0
  243. | +--- com.android.support:support-annotations:28.0.0
  244. | +--- com.android.support:support-compat:28.0.0 (*)
  245. | +--- com.android.support:support-core-utils:28.0.0 (*)
  246. | +--- com.android.support:customview:28.0.0
  247. | | +--- com.android.support:support-annotations:28.0.0
  248. | | \--- com.android.support:support-compat:28.0.0 (*)
  249. | +--- com.android.support:viewpager:28.0.0
  250. | | +--- com.android.support:support-annotations:28.0.0
  251. | | +--- com.android.support:support-compat:28.0.0 (*)
  252. | | \--- com.android.support:customview:28.0.0 (*)
  253. | +--- com.android.support:coordinatorlayout:28.0.0
  254. | | +--- com.android.support:support-annotations:28.0.0
  255. | | +--- com.android.support:support-compat:28.0.0 (*)
  256. | | \--- com.android.support:customview:28.0.0 (*)
  257. | +--- com.android.support:drawerlayout:28.0.0
  258. | | +--- com.android.support:support-annotations:28.0.0
  259. | | +--- com.android.support:support-compat:28.0.0 (*)
  260. | | \--- com.android.support:customview:28.0.0 (*)
  261. | +--- com.android.support:slidingpanelayout:28.0.0
  262. | | +--- com.android.support:support-annotations:28.0.0
  263. | | +--- com.android.support:support-compat:28.0.0 (*)
  264. | | \--- com.android.support:customview:28.0.0 (*)
  265. | +--- com.android.support:interpolator:28.0.0
  266. | | \--- com.android.support:support-annotations:28.0.0
  267. | +--- com.android.support:swiperefreshlayout:28.0.0
  268. | | +--- com.android.support:support-annotations:28.0.0
  269. | | +--- com.android.support:support-compat:28.0.0 (*)
  270. | | \--- com.android.support:interpolator:28.0.0 (*)
  271. | +--- com.android.support:asynclayoutinflater:28.0.0
  272. | | +--- com.android.support:support-annotations:28.0.0
  273. | | \--- com.android.support:support-compat:28.0.0 (*)
  274. | \--- com.android.support:cursoradapter:28.0.0
  275. | \--- com.android.support:support-annotations:28.0.0
  276. \--- com.android.support:support-fragment:28.0.0
  277. +--- com.android.support:support-compat:28.0.0 (*)
  278. +--- com.android.support:support-core-ui:28.0.0 (*)
  279. +--- com.android.support:support-core-utils:28.0.0 (*)
  280. +--- com.android.support:support-annotations:28.0.0
  281. +--- com.android.support:loader:28.0.0 (*)
  282. \--- android.arch.lifecycle:viewmodel:1.1.1 (*)
  283. (c) - dependency constraint
  284. (*) - dependencies omitted (listed previously)
  285. A web-based, searchable dependency report is available by adding the --scan option.
  286. BUILD SUCCESSFUL in 2s
  287. 1 actionable task: 1 executed
  288. D:\002_Project\002_Android_Learn\Componentization>

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/993215
推荐阅读
相关标签
  

闽ICP备14008679号