Uncaught exception [file_open

Not too surprising. When you rebuild like that, do you get the “file_open” error, or something else?

Does it still produce files like app-debug.apk? (Delete those files and rebuild if you aren’t sure.)

With those lines still in the project xml, it produces nothing but the file_open error.
When they are commented out it produces app-debug.apk, app-debug-unaligned.apk and Zephyr-debug.apk

Turns out it wasn’t updating the game at all when those lines are included not even the .hx files.
It goes through the whole process of compiling and then opens the old Zephyr-debug.apk.
If it’s there from the previous build that is. Otherwise it just gives the file_open error.

So it’s not just the certificate line causing the problems, I thought it was because it was running the old Zephyr-debug from previous builds when I had the certificate commented out.

Well that’s interesting. So the build is definitely failing (produces no output file), but then it just keeps going (tries to open app-release.apk).

I notice that these are two distinct parts of the build process. In fact, lime test android is composed of two different phases (actually three, but only two matter here). lime build android is the phase that compiles your Haxe code, compiles the resulting C++ code, processes your templates, and runs Gradle. lime run android is the phase that tries to install app-release.apk (after renaming it “Zephyr-release.apk”). To test this, try lime run android, and you should see the exact same file_open error, except without waiting for it to build.

So somewhere along the line, lime build android fails, and it doesn’t return an error code. If it did return an error code, Lime wouldn’t proceed to the lime test android phase.

If Gradle isn’t giving you an error, then it’s worth running Gradle with various flags to see if you can find any clues. To do this, navigate to android/release/bin and run this:

> gradlew assembleRelease
> gradlew assembleRelease --stackTrace
> gradlew assembleRelease --stackTrace --info
> gradlew assembleRelease --stackTrace --verbose

These are arranged from least to most verbose. (And believe me, --verbose is extremely verbose, so hopefully you’ll spot something before then.)

You might want to start with “gradlew assembleDebug” so you know what a successful build looks like. And if you run that in a separate window, you can do a side-by-side comparison.