capacitor.settings.gradle' as it does not exist
Asked Answered
P

9

54

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.
Puke answered 5/8, 2020 at 14:52 Comment(0)
B
120

Try to sync your Ionic project by command:

ionic capacitor sync android
Bonzer answered 1/11, 2020 at 17:49 Comment(0)
N
35

JUST DO

npx cap sync android

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

Naiad answered 11/2, 2022 at 9:8 Comment(0)
C
13

Same thing happen to me. I did a

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

and this fixes it.

Cart answered 12/8, 2020 at 4:48 Comment(2)
This fixed it for me had to rerun ionic capacitor add android and it worked afterSilhouette
this fixed my issue. thanks, man.Sibyl
B
4

run ionic build before you run npx cap add android

Bacardi answered 9/7, 2022 at 14:35 Comment(0)
S
3

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

Spigot answered 10/10, 2021 at 1:12 Comment(0)
R
2

just do

npm install jetifier
npx jetify
npx cap sync android

enter image description here

Capacitor troubleshooting https://capacitorjs.com/docs/android/troubleshooting

Rakehell answered 1/12, 2021 at 5:20 Comment(1)
This worked for me on android BumbleBee. Only the cap command was requiredPilliwinks
A
2

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

Agro answered 7/3, 2022 at 16:35 Comment(0)
T
1
  1. Over folder project execute: $ capacitor update android
  2. On Android Studio execute: File -> Sync Project with Gradle Files
Thadthaddaus answered 1/6, 2022 at 4:42 Comment(1)
Thanks! This answer solved the sync problem with my vue + ionic 6 application in Android Studio 2020.3.1Apperception
B
0

What solved it for me was: npm run build

Bring answered 21/9, 2023 at 12:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.