How to add arguments to gradle.exe during the build process

So I am getting this same error. To add those options, rather than running the gradlew.bat call the rungradle.exe command itself. So in that directory run

rungradle.bat :app:assembleDebug --stacktrace

Unfortunately for me, running this didn’t really give me anything other than the same error message, some sort of issue with aapt. The game project I’m working on builds perfectly on another machine, so I am starting to suspect this may be an issue with the latest gradle or Android Studio.