Hey so this is not really a question but an answer
I just wanted to post it for others since I got terribly frustrated repeatedly getting the error “Invalid APK File” when trying to launch a freshly packaged Android game. I spent an entire hour googling the internet but to no avail. Until I realized that the batch file assumes that the current directory is the same as the directory from which it is launched, however I launched it (via command line) with the current directory being different. Once I CD to the same folder as the batch file and then run it, it runs fine!
This is btw bad batch file programming practice. A Windows batch file should never assume that the CD happens to be same as its location!! If you want to reference the folder that the batch file itself is located in, use the variable
%~dp0. An easy fix would be to simply do a
pushd "%~dp0" at the beginning of the batch file, and a
popd at the end.
Ok so for now: Make sure you CD to the batch file folder before running it from the command line!