Bhavin
Bhavin

Reputation: 501

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.

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.

Upvotes: 18

Views: 42159

Answers (7)

Eclair4k
Eclair4k

Reputation: 91

Updating Capacitor did the trick for me:

npx cap update

Upvotes: 9

Brijmohan Karadia
Brijmohan Karadia

Reputation: 447

  It is related to M1 chipset of mac.

   % brew uninstall node
   % brew install nodenv 
   % echo 'export PATH=${PATH}:~/.nodenv/shims' >> ~/.zprofile 
   % nodenv install 17.7.2
   % nodenv global 17.7.2

   % npx cap run android
   ✔ Copying web assets from www to android/app/src/main/assets/public in 7.48ms
  ✔ Creating capacitor.config.json in android/app/src/main/assets in 745.25μs
  ✔ copy android in 12.87ms
  ✔ Updating Android plugins in 3.42ms
  [info] Found 3 Capacitor plugins for android:
   @capacitor/[email protected]
   @capacitor/[email protected]
   @capacitor/[email protected]
  ✔ update android in 32.04ms
  ✔ Running Gradle build in 1.32s
  ✔ Deploying app-debug.apk to emulator-5554 in 1.88s


 ref https://github.com/ionic-team/capacitor/issues/5545

Upvotes: 0

Rohan Patil
Rohan Patil

Reputation: 175

Solved:

  • Delete the Android Directory from your folder
  • Follow the steps mentioned in the ionic capacitor troubleshoot documentation at

https://capacitorjs.com/docs/android/troubleshooting#recreating-your-project

Upvotes: -2

JuanPabloAmador
JuanPabloAmador

Reputation: 635

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

Upvotes: 48

Aaron Jordan
Aaron Jordan

Reputation: 2497

I was getting this error while only using Capacitor which I thought was strange so I nuked the android path in my root folder and then npx cap add android again and the build worked after that

Upvotes: 5

Masood
Masood

Reputation: 1594

This issue is mostly faced, when you add/remove a new plugin. So by just running cordova clean can resolve that issue.

Inside your CMD/Terminal:

C:\<project folder>\cordova clean

Upvotes: 0

DaveAlden
DaveAlden

Reputation: 30366

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

Upvotes: 11

Related Questions