In Visual Studio Code, open terminal and write "cd android" to enter android folder. Then clear the gradle cache by writing "./gradlew clean". Then try to build it again using "./gradlew build".