Temporary fix:
After some trial and error I noticed that if the project is in the C: drive where I keep installed software only, then I get .aab and .apk files of the project. Only when the project is in another drive in my case D: drive ( I only have C and D drives), the build fails.
Is there anything I can do so that I can build files from D drive? I have also noticed some error message in the console even when the build is successful.
Full console log for successful build: https://pastebin.com/Ap4KZCvd
Here is the snippet of the error message:
Picked up JAVA\_TOOL\_OPTIONS: -Duser.language=en To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/5.1.1/userguide/gradle\_daemon.html. Daemon will be stopped at the end of the build stopping after processing Exception in thread "DisconnectableInputStream source reader" org.gradle.api.UncheckedIOException: java.io.IOException: The handle is invalid at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:61) at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:41) at org.gradle.util.DisconnectableInputStream$1.run(DisconnectableInputStream.java:125) at java.base/java.lang.Thread.run(Thread.java:835) Caused by: java.io.IOException: The handle is invalid at java.base/java.io.FileInputStream.readBytes(Native Method) at java.base/java.io.FileInputStream.read(FileInputStream.java:273) at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252) at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292) at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351) at org.gradle.util.DisconnectableInputStream$1.run(DisconnectableInputStream.java:96) ... 1 more