Android build fails

Is there a way to not delete the temporary build folder (TEMP_DIR in the build.xml) when the build fails? So that I can at least try to debug the build. I’m not very familiar with this ant build system.

Details below:


05:15:46.072 Authorizing plugins
05:15:46.072 Error while fetching plugins:
05:15:46.072 FAILURE: Build failed with an exception.
05:15:46.072 * Where:
05:15:46.072 Build file ‘C:\Users\xxx\AppData\Local\Temp\Corona Labs\CLtmpa02700\template\app\build.gradle.kts’ line: 562
05:15:46.072 * What went wrong:
05:15:46.072 Error while fetching plugins:

So I “solved” the problem. In a very hacky way:

On my PC, Android SDK is installed. I installed Solar2D on a laptop with no SDK, building a blank project works, whilst building a blank project on my PC does not work.

On my PC, CoronaBuilder.exe returns with an absurd exit code: -1073741819

The Lua build scripts also have similar exit codes.

So I modified the files inside
in build.gradle.kts, change coronaBuilder to point to a batch file that forwards its arguments to CoronaBuilder.exe then “exit /b 0”

Modified the Lua build scripts to append “os.exit (0)”

Repacked, and it works.

Must be another some issue with MSVCRT.

I found the problem:

the json.lua calls dkjson.lua which tries to require ‘lpeg’. There is an lpeg.dll in my system executable path linked to a different C-runtime.