我在这个网站上尝试了很多解决方案,但问题仍未解决.问题是由于Android X库.当我添加AndroID X时,此问题已得到解决,但它开启了新问题.我不想添加AndroID X.如何解决这个问题?
早些时候这个错误即将来临:
Manifest merger Failed : Attribute application@appComponentFactory value=(androID.support.v4.app.CoreComponentFactory) from [com.androID.support:support-compat:28.0.0] AndroIDManifest.xml:22:18-91is also present at [androIDx.core:core:1.0.0] AndroIDManifest.xml:22:18-86 value=(androIDx.core.app.CoreComponentFactory).Suggestion: add 'tools:replace="androID:appComponentFactory"' to <application> element at AndroIDManifest.xml:19:5-142:19 to overrIDe.
我添加工具后:replace =“androID:appComponentFactory”,这个错误来了:
java.lang.RuntimeException: Manifest merger Failed with multiple errors, see logsat com.androID.builder.core.AndroIDBuilder.mergeManifestsForApplication(AndroIDBuilder.java:540) at com.androID.build.gradle.tasks.MergeManifests.doFullTaskAction(MergeManifests.java:173)
合并错误(在AndroID Manifest中):
Error: tools:replace specifIEd at line:2 for attribute
androID:appComponentFactory, but no new value specifIEd app main
manifest (this file), line 1
表现:
<?xml version="1.0" enCoding="utf-8"?><manifest package="com.example" xmlns:androID="http://schemas.androID.com/apk/res/androID" xmlns:tools="http://schemas.androID.com/tools" tools:replace="allowBackup, androID:appComponentFactory" androID:allowBackup="false"> ... <application androID:name="com.example" androID:icon="@mipmap/icon" androID:deBUGgable="true" androID:harDWareAccelerated="false" androID:largeHeap="true" androID:supportsRtl="true" androID:theme="@style/Apptheme" androID:allowBackup="false" tools:ignore="GoogleAppIndexingWarning,HardcodedDeBUGMode"> ...
解决方法:
我认为你正在迁移到AndroIDX库.
将以下行添加到gradle.propertIEs文件中
androID.useandroidX=trueandroID.enableJetifIEr=true
从清单中删除工具:replace =“androID:appComponentFactory”.
将androID.support.v7.app.AppCompatActivity替换为androIDx.appcompat.app.AppCompatActivity
Migrating to AndroidX
总结以上是内存溢出为你收集整理的java – Android X:工具:替换为line:for属性,但没有指定新值全部内容,希望文章能够帮你解决java – Android X:工具:替换为line:for属性,但没有指定新值所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)