stackoverflow上有相关的解决方案
https://stackoverflow.com/questions/46948498/android-studio-3-0-manifest-error-unknown-element-action-found
https://stackoverflow.com/questions/46976562/my-android-manifest-is-full-of-errors-after-updating-to-android-3-0-0/46976776
https://developer.android.com/guide/topics/manifest/manifest-intro#filestruct
说白了,就是AAPT2强校验Manifest.xml中的嵌套关系了
解决这个问题,要看看报错的<activity>之类的,是否放错了地方
不要直接禁用AAPT2,那个治标不治本
比如我的,报错<activity>,这个应该放在<application>下
贴一个manifest结构关系
<manifest>
<uses-permission />
<permission />
<permission-tree />
<permission-group />
<instrumentation />
<uses-sdk />
<uses-configuration />
<uses-feature />
<supports-screens />
<compatible-screens />
<supports-gl-texture />
<application>
<activity>
<intent-filter>
<action />
<category />
<data />
</intent-filter>
<meta-data />
</activity>
<activity-alias>
<intent-filter> . . . </intent-filter>
<meta-data />
</activity-alias>
<service>
<intent-filter> . . . </intent-filter>
<meta-data/>
</service>
<receiver>
<intent-filter> . . . </intent-filter>
<meta-data />
</receiver>
<provider>
<grant-uri-permission />
<meta-data />
<path-permission />
</provider>
<uses-library />
</application>
</manifest>