'Files under the "build" folder are generated and should not be edited

This morning I was coding an app following a tutorial (https://www.youtube.com/watch?v=iFdtSi1v1Vk/) and after adding

compile 'com.microsoft.projectoxford:emotion:1.0.355'

as stated in the tutorial to the build.gradle and then syncing the gradle, almost everything in my manifest turned red and I got the message stating "Files under the 'build' folder are generated and should not be edited." How do I fix this? I have tried everything in other stackoverflow forums related to this query to no avail. I really do not want to start over as I have put a large amount of effort into this app and would be devastated.

Screenshots -- https://imgur.com/a/g46Ws



Solution 1:[1]

Fixed by removing the line of code that caused the issue and rebuilding the project, as well as syncing the gradle.

Solution 2:[2]

I solved the error by cleaning the project. In the android studio, navigate to the Build, the click on CLean Project. It will solve.

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 FurmanTL
Solution 2 Kibet Arwa