UserError: FAILURE: Build failed with an exception - on Android

I have searched the forum for this error I keep getting during an Android debug build but see no reference to this compilation error:

"UserError: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileDebugJava WithJavac'. > Compilation failed; see the compiler error out"

It builds and runs on iOS fine. For Android, it is set to ‘run-android – debug’, package type ‘apk’, and I tried clearing both Google Play Key and Google Play Track properties and still get the same error. I have attached the log file. Is there any way to tell what deprecated portion of the app the log is referring to?```

Error portion of the log:

Use '--warning-mode all' to show the individual deprecation warnings.

36 actionable tasks: 36 executed
Command failed with exit code 1: /platforms/android/gradlew cdvBuildDebug -b /platforms/android/build.gradle
Error: Command failed with exit code 1: /platforms/android/gradlew cdvBuildDebug -b /platforms/android/build.gradle
    at makeError (/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Any suggestions on how to resolve this?

You need to update your project.

Have a look at this article on Upgrading to Cordova 11.

Specifically, you will need to do Set your engine and Get rid of the whitelist plugin. (Other project may need to do some other steps here.)

Thanks. Will give it a go. Do we need to remove the following entries which followed that whitelist plugin?

  <allow-intent href="http://*/*" />
  <allow-intent href="https://*/*" />
  <access origin="*" />```

I’m using cordova-plugin-inappbrowser to open a link or two in Safari so I’m not sure now if I still need these entries.

It will build OK with those lines. You’ll have to test it on a device to make sure everything is still OK.

Thank you! That solved the problem.