Voltbuild Failing

Hi,
Trying to build apks is failing (even for untouched projects that were builiding fine yesterday)

The headline fail message looks like this :-1:
UserError: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ā€˜:app:compileDebugJava WithJavacā€™. > Compilation failed; see the compiler error out

I think i had this for a few minutes yesterdayā€¦but figured it was an issue on the Voltbuilder side, because it came back without me changing anything.
Can someone take a look?
Thanks,
Neil

i might try upgrading to the new version of NSB/Appstudio (Beta) ?

I note that the new version needs a Java update - so will see if thatā€™s related to my compile issue on the prev version.

Update : new beta version (along with Java update) made no difference.
Voltbuilder failing with the same errorā€¦

Ok, i found the issue/ fix.

I use this plugin :-

cordova-plugin-camera-preview

and have left it without a ā€˜specā€™ in the past. There was an update yesterday which has crashed the Voltbuild process.

So iā€™ve updated to point to the older version :-1:

Hopefully will figure out whatā€™s up with version 0.13.0 !
N

Can you share your build log from VoltBuilder with the failure?

Voltbuilder.2024-07-24 15-43-50.log (21.6 KB)

The problem is the fact you are building with engine 11 (Android 12) but now the plugin requires engine 12+ (Android 13). Unless you have a good reason to specify the android engine, I would suggest removing that line.

Looks like thereā€™s a deeper can of wormsā€¦
I have apps that use regular camera, camera-preview and barcode-scanner plugins.
It appears the latest version of Android (when not specifying engine) is having major issues with this.

Catch 22 is thisā€¦

If I build for Android engine 11 then my build will work with the older version of camera-preview.
If I build for Android 13 (latest) there is a problem with permissions relating to various plugins vying for hardware control.

Thereā€™s very little guidance on the finer points of ā€œhooksā€, ā€œcustom-configsā€,ā€œbefore prepareā€, ā€œafter prepareā€ on Voltbuilder notes / NSB Appstudio, so Iā€™m delving into Google / Stack Overflow etcā€¦ but Iā€™m going from hazy into blind on this.

Result is Iā€™m into a cycle of trial and errorā€¦

I may have a solution using something like :-

  <custom-preference name="android-manifest/uses-permission[@android:name='android.permission.WRITE_EXTERNAL_STORAGE']" delete="true" />

Will report backā€¦
N

  <custom-preference name="android-manifest/uses-permission[@android:name='android.permission.WRITE_EXTERNAL_STORAGE']" delete="true" />

okā€¦ that extra line of custom-preference (using the

<plugin name="cordova-custom-config" />

and also

 <custom-preference name="android-manifest/uses-feature[@android:name='android.hardware.camera']" delete="true" />

gets the job done.

I was winging it with the uses-permission one by taking the error output and formulating it into the same style as the uses-feature oneā€¦
Lucky hacking I guess! :slight_smile:

So now, with the above, I can get all the different plugins (barcode, camera, camera-preview) working.
As well as NFC, Video Editing, Audio, OCR .
Never a dull moment with Google raising the bar every few months. :smiley:
N

N

As a postscriptā€¦I think hooks are not something that work on Voltbuilderā€¦ from my dozen or so attemptsā€¦
Glad I found the alternative!

Hooks should be functional - can you tell me what kind of problems you were having?