Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting Error while IONIC build properties.gradle does not Exist

  1. i am trying to creating ionic build, but getting error, here is my step.
  2. ionic cordova platform remove android
  3. ionic cordova platform add android
  4. ionic cordova build android

while i run last command then got below Error.

FAILURE: Build failed with an exception.
  • Where: Script 'D:\Projects\corporatesolutionmobileapp\platforms\android\cordova-android -support-gradle-release\sancial-cordova-android-support-gradle-release.gradle' l ine: 11

  • What went wrong: A problem occurred evaluating script.

    Could not read script 'D:\Projects\corporatesolutionmobileapp\platforms\androi d\app\cordova-android-support-gradle-release\properties.gradle' as it does not e xist.

  • 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 1s [ERROR] An error occurred while running subprocess cordova.

    cordova build android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more
    information.
like image 205
Bhavin Avatar asked Nov 27 '22 21:11

Bhavin


2 Answers

I was having a similar problem, running the command ionic capacitor run android I was getting androidmanifest.xml doesn't exist.

It was solved by running the command ionic capacitor update

like image 134
JuanPabloAmador Avatar answered Dec 05 '22 12:12

JuanPabloAmador


Updating to the most recent version (v2.0.1) of cordova-android-support-gradle-release should resolve your issue:

ionic cordova platform rm android
ionic cordova plugin rm cordova-android-support-gradle-release
ionic cordova plugin add cordova-android-support-gradle-release@latest 
ionic cordova platform add android
ionic cordova build android
like image 26
DaveAlden Avatar answered Dec 05 '22 12:12

DaveAlden