After getting this error on first setup:
capacitor.settings.gradle' as it does not exist
..I used two commands from that page: npx cap sync android
and npm install --save @capacitor/core @capacitor/cli
. I'm not sure which one fixed that error, but it gave me the one on this page. I didnt want to build Gradle again when Android Studio should have it, so I restarted it and it started downloading a bunch of Gradle stuff to: /home/user/.gradle. It then prompted me to upgrade Gradle.
I then got a similar error to the OP Could not find method include() for arguments [:app] on root project 'android' of type org.gradle.api.Project.
.
So finally running the above ./gradlew assembleRelease
, this error was shown:
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. All licenses can be accepted using the sdkmanager command line tool: sdkmanager.bat --licenses
I installed SDK sudo snap install android-sdk
but didnt have it. Installed with sudo apt install sdkmanager
and then sudo sdkmanager --licences
(y) to accept.. and got the same error. Found sdkmanager under Tools in AStudio. Tried to update there, but failed. Opened with sudo android-studio
, had to select /home/user/.config/Google/AndroidStudioX.Y