Error in release package build on Ionic Pro


Hello, today I started to run into this error when trying to generate the build for launch.

I clarify that I was doing different versions of packaging without problems and now without changes this happens to me and I do not know why.

:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have
changed, no previous execution, etc.).
error: local variable onComplete is accessed from within inner class;
needs to be declared final
AsyncLoadImage task = new AsyncLoadImage(cordova, webView, options, onComplete);
^ Note: Some input files use or override a deprecated API. Note:
Recompile with -Xlint:deprecation for details. Note: Some input files
use unchecked or unsafe operations. Note: Recompile with
-Xlint:unchecked for details. 1 error :compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:compileReleaseJavaWithJavac’.
    Compilation failed; see the compiler error output for details.

From my Mac I can generate the apk with ionic cordova build android --prod and it works without problems on my device. What can be happening?