对属性android:appComponentFactory在行11处指定的tools:replace,但未在应用主清单(此文件)的第10行中指定新值 [英] tools:replace specified at line:11 for attribute android:appComponentFactory, but no new value specified app main manifest (this file), line 10

查看:118
本文介绍了对属性android:appComponentFactory在行11处指定的tools:replace,但未在应用主清单(此文件)的第10行中指定新值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建项目时出现以下错误:

When I build my project I get these errors :

合并错误:错误:在属性:android:appComponentFactory的行:11处指定了tools:replace,但未在应用程序的主要清单(此文件)的第10行中指定新值

Merging Errors: Error: tools:replace specified at line:11 for attribute android:appComponentFactory, but no new value specified app main manifest (this file), line 10

错误:验证失败,退出了应用主清单(此文件)

Error: Validation failed, exiting app main manifest (this file)

这是我的清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="org.apoce.app">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />


    <application
        android:name="org.apoce.app.MyApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="false"
        android:theme="@style/AppTheme.NoActionBar"
        tools:replace="android:appComponentFactory">

        <!--activities-->
        <activity
            android:name="org.apoce.app.SplashActivity"
            android:theme="@style/SplashTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
...

该怎么做才能解决此问题

what i can do to fix this

推荐答案

错误提示

tools:replace在属性的第11行指定 android:appComponentFactory,但未指定新值

tools:replace specified at line:11 for attribute android:appComponentFactory, but no new value specified

这意味着您已经用appComponentFactory替换了当前值,但没有为其提供新值.

Which means you have replaced current value for appComponentFactory but didn't gave a new value for it.

尝试一下.

tools:replace="android:appComponentFactory"
android:appComponentFactory="@string/app_name"

类似的问题:用于API的Android设计支持库28(P)无法正常工作

这篇关于对属性android:appComponentFactory在行11处指定的tools:replace,但未在应用主清单(此文件)的第10行中指定新值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆