0
votes

I have an Ionic Cordova app that I have not touched in a few months. I wanted to make a small tweak to the app today and release it but when I did, I started having a dependency issue.

When I try to run 'ionic cordova run android' the build fails. Even without making any changes to the app (revert all changes and try to build what worked for the last APK) it still is failing. I have tried uninstalling the cordova intercom plugin and that changed nothing. I have also tried updating all of my npm packages and that did not help either.

This is the error log I get:

cordova run android Android Studio project detected cordova-android-firebase-gradle-release: Android platform: cordova-android@7 cordova-android-firebase-gradle-release: No custom version found in config.xml - using plugin default cordova-android-play-services-gradle-release: Android platform: cordova-android@7 cordova-android-play-services-gradle-release: No custom version found in config.xml - using plugin default cordova-android-support-gradle-release: Android platform: cordova-android@7 cordova-android-support-gradle-release: No custom version found in config.xml - using plugin default Preparing Firebase on Android ANDROID_HOME=C:\Users\Boogaloo\AppData\Local\Android\sdk JAVA_HOME=C:\Program Files\Java\jdk1.8.0_171 studio Subproject Path: CordovaLib Subproject Path: app publishNonDefault is deprecated and has no effect anymore. All variants are now published. cordova-android-firebase-gradle-release: 15.0.0 cordova-android-play-services-gradle-release: 15.0.0 cordova-android-support-gradle-release: 27.+ Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead. The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. at build_8vin5yy2zwz3fxyzepqpp0rqu.run(C:\Users\Boogaloo\WebstormProjects\IONIC\projects\myapp\platforms\android\app\build.gradle:151)

FAILURE: Build failed with an exception.

BUILD FAILED in 3s (node:3432) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

BUILD FAILED in 3s at ChildProcess.whenDone (C:\Users\Boogaloo\WebstormProjects\IONIC\projects\myapp\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) (node:3432) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:3432) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Update

I tried updating the cordova android platform to 7.1.0 but it hasn't helped. I can't seem to delete the cordova firebase plugin using the command

ionic cordova plugin remove cordova-plugin-firebase

1

1 Answers

0
votes

Do you use cordova-plugin-firebase?

If so,

run ionic cordova plugin remove cordova-plugin-firebase and try building again.

If it works, ionic cordova plugin add [email protected]