capacitor.settings.gradle' as it does not exist

Viewed 18317

I am new to Ionic while build the app in android. Its opening a project in Android Studio but while gradle sync its showing the following error

Could not read script 'F:\IonicProjects\mis-tracking-master-latest\mis-tracking-master\mis-tracking\android\capacitor.settings.gradle' as it does not exist.
8 Answers

Try to sync your Ionic project by command:

ionic capacitor sync android

JUST DO

npx cap sync android

If you only use capacitor from (Vuejs, nuxtjs, etc.) without ionic

Same thing happen to me. I did a

npm install --save @capacitor/core @capacitor/cli

and this fixes it.

change the name of my file /android/settings.gradle to capacitor.settings.grandle works for me

  1. Over folder project execute: $ capacitor update android
  2. On Android Studio execute: File -> Sync Project with Gradle Files

This is what solved it for me: I'm using next/JS and I export it. So the build folder is not "build", it is "out".

Just go to the capacitor.config.json and change the webDir property to out

run ionic build before you run npx cap add android

Related