Android build fails on fresh app

Hi there, I’m trying to build a fresh android project that I just created with npx cap add android. But the build fails with the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:mergeReleaseNativeLibs'.
> Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'.
   > Could not resolve project :capacitor-android.
     Required by:
         project :app
      > No matching configuration of project :capacitor-android was found. The consumer was configured to find a runtime of a component, as well as attribute '' with value 'release' but:
          - None of the consumable configurations have attributes.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at


Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
Error: /Users/runner/work/1/s/gradlew failed with return code: 1
    at ChildProcess.<anonymous> (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/1.128.0/node_modules/vsts-task-lib/toolrunner.js:569:30)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:920:16)
    at Socket.<anonymous> (internal/child_process.js:351:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:509:12)
##[error]Error: /Users/runner/work/1/s/gradlew failed with return code: 1

I have recreated the project multiple times, but I always run in this kind of error. Is there something that I might be missing? Just in case somebody has time to take a look at it, I’ve uploaded the project zip file here

I think you have not install @capacitor/andriod as a dependencies
Did you use

ionic capacitor add

and select android when prompted.

i say this because of the following line in your error console

No matching configuration of project :capacitor-android was found

hey there,

my project doesn’t use ionic. I’ve followed this guide to install capacitor into an existing project: Capacitor - build cross platform apps with the web

I’ve just tried it again on a different PC and it worked :thinking: