重复属性 AAPT2 link 在免安装应用的功能模块中失败

duplicate attribute AAPT2 link failed in feature Module in Instant app

我正在关注 google 免安装应用代码实验室。在我将原始应用程序转换为 baseFeature 并添加另一个功能模块之后,该模块将像应用程序一样运行,但将基于原始 baseFeature。

按照代码实验室中所述,我更改了 buld.gradle 文件并从功能模块(非基本模块)中删除了应用程序组件。当我尝试构建项目时,出现以下错误。

Error:(4) duplicate attribute
Error:/home/adventure/Desktop/android-topeka/topekaapk/build/intermediates/manifests/full/debug/AndroidManifest.xml:4 duplicate attribute
Error:java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.AaptException: AAPT2 link failed:
Error:com.android.builder.internal.aapt.AaptException: AAPT2 link failed:
Error:Execution failed for task ':topekaapk:processDebugResources'.
> Failed to execute aapt

我被 lint 捅了一刀,是 LINT

问题: 如图所示 Lint 给出了优化导入的警告,我删除了 xmlns 属性从清单。

解决方法: 不要删除xmlns 属性