I'm pulling my hair out trying to get my project setup with intellij, the desktop and emulator works fine, but when trying to output to an apk, I get a lot of problems and it's really hard to figure out how the project needs to be organized.
It shouldn't be hard, all I want to do is to build the swf file into the bin folder (where many other art assets lie), and then package the entirety of the bin folder into an apk in the dist folder. But it outputs the following: showing all sorts of crazy directories. I've screenshot some of my project settings and build configuration.
Cannot run program "C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.1\jbr\bin\java.exe" (in directory "C:\Users\kelso\OneDrive\Documents\idlearmy\dist\bin\bin"): CreateProcess error=267, The directory name is invalid ADT command line: C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.1\jbr\bin\java.exe -Dapplication.home=C:\air -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx512m -jar C:\air\lib\adt.jar -package -target apk -storetype PKCS12 -keystore C:\Users\kelso\AppData\Roaming\JetBrains\IntelliJIdea2022.2\plugins\flex\lib\temp_keystore.p12 -storepass keystore_password C:\Users\kelso\OneDrive\Documents\idlearmy\dist\bin\bin\idlearmy.apk C:\Users\kelso\OneDrive\Documents\idlearmy\dist\bin\idlearmy-android-descriptor.xml -C C:\Users\kelso\OneDrive\Documents\idlearmy\dist\bin idlearmy.swf -C C:\Users\kelso\OneDrive\Documents\idlearmy bin
https://imgur.com/a/gfEaMPB