Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cordova run android exited with exit code 1

While running ionic cordova run android I got the following error:

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processDebugGoogleServices'.

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.6.2.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 3s 21 actionable tasks: 1 executed, 20 up-to-date cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processDebugGoogleServices'.

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.6.2.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 3s [ERROR] An error occurred while running subprocess cordova.

    cordova run android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.
like image 540
Chandan Sen Avatar asked Dec 31 '25 04:12

Chandan Sen


1 Answers

Such problem seems to come from an outdated version of gradle.

Step to fix

  1. Download android studio
  2. Update gradle to the latest version
  3. Keep android studio open
  4. Remove android -> ionic cordova platform rm android
  5. Control that the platforms folder is empty inside your project
  6. run ionic cordova platform add android
  7. Try again tu run ionic cordova run android
like image 99
Raphaël Balet Avatar answered Jan 04 '26 00:01

Raphaël Balet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!