• <tfoot id='JvLM3'></tfoot>

    1. <legend id='JvLM3'><style id='JvLM3'><dir id='JvLM3'><q id='JvLM3'></q></dir></style></legend>
        <bdo id='JvLM3'></bdo><ul id='JvLM3'></ul>

      <small id='JvLM3'></small><noframes id='JvLM3'>

        <i id='JvLM3'><tr id='JvLM3'><dt id='JvLM3'><q id='JvLM3'><span id='JvLM3'><b id='JvLM3'><form id='JvLM3'><ins id='JvLM3'></ins><ul id='JvLM3'></ul><sub id='JvLM3'></sub></form><legend id='JvLM3'></legend><bdo id='JvLM3'><pre id='JvLM3'><center id='JvLM3'></center></pre></bdo></b><th id='JvLM3'></th></span></q></dt></tr></i><div id='JvLM3'><tfoot id='JvLM3'></tfoot><dl id='JvLM3'><fieldset id='JvLM3'></fieldset></dl></div>

        Android X:tools:replace 在 line:for 属性中指定,但没有

        时间:2023-09-28
          <tbody id='1XnUU'></tbody>

        • <i id='1XnUU'><tr id='1XnUU'><dt id='1XnUU'><q id='1XnUU'><span id='1XnUU'><b id='1XnUU'><form id='1XnUU'><ins id='1XnUU'></ins><ul id='1XnUU'></ul><sub id='1XnUU'></sub></form><legend id='1XnUU'></legend><bdo id='1XnUU'><pre id='1XnUU'><center id='1XnUU'></center></pre></bdo></b><th id='1XnUU'></th></span></q></dt></tr></i><div id='1XnUU'><tfoot id='1XnUU'></tfoot><dl id='1XnUU'><fieldset id='1XnUU'></fieldset></dl></div>
          <tfoot id='1XnUU'></tfoot>

        • <legend id='1XnUU'><style id='1XnUU'><dir id='1XnUU'><q id='1XnUU'></q></dir></style></legend>

            • <bdo id='1XnUU'></bdo><ul id='1XnUU'></ul>
            • <small id='1XnUU'></small><noframes id='1XnUU'>

                • 本文介绍了Android X:tools:replace 在 line:for 属性中指定,但没有指定新值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我在这个网站上尝试了很多解决方案,但问题仍然没有解决.问题是由于 Android X 库造成的.当我添加 Android X 时,这个问题得到了解决,但它打开了新问题.如何解决这个问题?

                  I have tried many solutions on this website but still, the problem is not solved. The issue is due to Android X library. When I added Android X, this issue was resolved but it opened up new issue. How to fix this issue?

                  之前这个错误出现了:

                  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-91
                  is 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.
                  

                  我添加了tools:replace="android:appComponentFactory"后,出现了这个错误:

                  After I added tools:replace="android:appComponentFactory", this error is came:

                   java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs
                  at com.android.builder.core.AndroidBuilder.mergeManifestsForApplication(AndroidBuilder.java:540)    
                  at com.android.build.gradle.tasks.MergeManifests.doFullTaskAction(MergeManifests.java:173)
                  

                  合并错误(在 Android 清单中):

                  Merging Error (in Android Manifest):

                  错误:工具:替换在第 2 行指定的属性android:appComponentFactory,但没有指定新值 app main清单(此文件),第 1 行

                  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 库.

                  I think you are migrating to AndroidX libs.

                  将下面的行添加到 gradle.properties 文件

                  Add below lines to gradle.properties file

                  android.useAndroidX=true
                  android.enableJetifier=true
                  

                  从清单中删除 tools:replace="android:appComponentFactory".

                  android.support.v7.app.AppCompatActivity 替换为 androidx.appcompat.app.AppCompatActivity

                  迁移到 AndroidX

                  这篇关于Android X:tools:replace 在 line:for 属性中指定,但没有指定新值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:得到“不支持的类文件版本 52.0"在将模块包含 下一篇:在我的“gradle build"中遇到“org.gradle.api.Proj

                  相关文章

                  最新文章

                    <i id='1SZVz'><tr id='1SZVz'><dt id='1SZVz'><q id='1SZVz'><span id='1SZVz'><b id='1SZVz'><form id='1SZVz'><ins id='1SZVz'></ins><ul id='1SZVz'></ul><sub id='1SZVz'></sub></form><legend id='1SZVz'></legend><bdo id='1SZVz'><pre id='1SZVz'><center id='1SZVz'></center></pre></bdo></b><th id='1SZVz'></th></span></q></dt></tr></i><div id='1SZVz'><tfoot id='1SZVz'></tfoot><dl id='1SZVz'><fieldset id='1SZVz'></fieldset></dl></div>

                    <small id='1SZVz'></small><noframes id='1SZVz'>

                  1. <legend id='1SZVz'><style id='1SZVz'><dir id='1SZVz'><q id='1SZVz'></q></dir></style></legend>
                        <bdo id='1SZVz'></bdo><ul id='1SZVz'></ul>
                    1. <tfoot id='1SZVz'></tfoot>