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

﹥>﹥吖頭↗ 提交于 2020-06-01 07:18:29

问题


When I build my project I get these errors :

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)

This is my Manifest :

<?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


回答1:


The error says

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

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

Try this.

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

Similar issue : Android design support library for API 28 (P) not working



来源:https://stackoverflow.com/questions/58245436/toolsreplace-specified-at-line11-for-attribute-androidappcomponentfactory-bu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!