Hi all! I’m completely new to Solar2D (as in, I literally just started messing with it today).
It looks really awesome all in all, but there’s one thing that pushed me into a rabbit hole. Apparently, the default way to build is through the Simulator UI and it seems that every single time I try to build an apk/aab I need to type in all the data again, e.g. app name and android package, etc.
Now, I managed to find out about the console build tool, which seems to be called solar2d.builder
in my version, which should let me script it.
The trick is that I just can’t figure out how exactly to use it. When I tried to imitate the examples I found on this forum and elsewhere on the web where they load a lua file, I’d get a cannot open build/android.lua: Permission denied
- maybe a linux issue, as I’m running on it.
And when I tried to load the data through stdin, the format defaulted to json. Which s also good, except that when I converted the lua file to json and tried again… then it complained about “malformed or invalid build arguments” but without specifying which arguments are missing.
It feels like I’m missing something obvious. If this rings a bell for anyone here I’d be very grateful if you could give me a hint.
This is how my (now json) file looks like:
{
"platform": "android",
"appName": "My Cool App",
"appVersion": "2.0.0",
"androidAppPackage": "my.package.name",
"versionCode": 2,
"versionName": "2.0.0",
"dstPath": "./target",
"projectPath": ".",
"sdkPath": "/home/username/Android/Sdk"
}