提示使用 tools:replace
Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml
这里提示很清楚了,将'tools:replace="android:theme"' 添加到 <application> 标签里,如下:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.zxx_flutter">
<application
...
tools:replace="android:theme"
...
>
注意:这里的 <application>是主项目的<application>,不是第三方库的
提示多个 tools:replace
Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml
Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml
多个tools:replace,添加时用逗号隔开,如下:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.zxx_flutter">
<application
...
tools:replace="android:icon,android:theme"
...
>
提示 tools:replace specified at line:x for attribute android:theme, but no new value specified
在<application>添加tools:replace,还必须有对应value的配置
tools:replace specified at line:25 for attribute android:theme, but no new value specified
如上面添加 tools:replace="android:theme",所以必须有android:theme的配置,如下:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.zxx_flutter">
<application
...
tools:replace="android:icon,android:theme"
android:theme="xxx"
...
>
网友评论