'How can I refactor a module in Android Studio to a subdirectory?

From the screenshot below, how can I refactor the highlighted directories and files into MoveToThisDirectory? Simply refactoring will cause issues such as Error: AndroidManifest.xml doesn't exist or has incorrect root tag. Which I have not figured how to resolve.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source