So I believe the issue is with how unity creates an environment for its projects. when I installed the Android SDK via the editor, instead of using my current JDK/android studio tools/NDK/gradle, it installed a fresh copy of all these tools. However, in settings, I found that the Keystore path was still /Users/anshsachdeva/".
I am guessing that Android SDK needs to validate a Keystore every time it generates a build. And since the SDK of my "Android Studio" created that Keystore, the SDK from "Unity Editor" was not finding it valid.
I simply deleted the debug Keystore there and voila! the unity app gets created and runs successfully
Kinda awkward but every time I switch my software, I will have to repeat this process.
Update : Following info is suggested by a stack overflow user (name showing as anonymous in edit request) . I cannot verify this right now, but approving it as it might be useful :
Kinda awkward but every time I switch my software, I will have to repeat this process.
With regards to this sentence, one can create their own debug keystore in Unity and do not need to delete it in .android folder.
You need to click on Player setting:
Under Player, click on Publishing Settings, then click on Keystore Manager. Fill all the required info and save it anywhere you want. For the next build, the generated debug keystore will be used.