I added a new generated JNI method to GeckoAppShell today. Building with 'mach build' gave an error that the method didn't exist. After a bit, I tried just building mobile/android to see if it would fix the problem (using 'make -C mobile/android') and finally saw a 'run this command' message (why do we not just do that for you?). Running that seems to have made the world happy. This should all just work with no intervention.
We shouldn't run the command automatically because it potentially clobbers local changes if you have any. But I do agree that the full error message should show up when you run mach build; I don't know why that is different from make -C mobile/android. CC'ing ckitching and gps.
Indeed. It's a bit of a kludge. The procedure that works is to annotate the new method in Java, run a build, copy the generated files, then add your C++ code that uses the new C++ method, then build again. This isn't obvious.