Error reporting: no content is allowed in the preface


Error code:

Execution failed for task ‘:app:mergeDebugResources’.

> Could not resolve all files for configuration ‘:app:_internal_aapt2_binary’.
> Could not resolve
Required by:
project :app
> Could not resolve
> Could not parse POM
> ǰ���в����������ݡ�


Try one

Answer website: 35928566/article/details/103474974

Possible: unable to merge resources. It is the reference error of the original components referenced by XML, such as LinearLayout. This situation is generally caused by the confusion of Android studio cache, that is, the confusion of project cache when you open multiple different gradles.

Solution: Android studio click file → invalidate cache / restart → invalidate and restart

Wait for the reboot to resolve

Note: only one item can be opened before clicking invalidate and restart. Otherwise, gradle will start together and conflict after restarting

The problem is not solved, and an error is still reported during real machine simulation


Try two:

Most online methods are:
Move the assets file to the Src / main / directory,
Because the assets directory and res directory should be placed under the same level directory. But no assets were created

//To be solved