Hi There Community,
I am facing the issue with building my ionic capacitor project on android studio.
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> 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 library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-community-background-geolocation.
Required by:
project :app
> No matching configuration of project :capacitor-community-background-geolocation was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-app.
Required by:
project :app
> No matching configuration of project :capacitor-app was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-browser.
Required by:
project :app
> No matching configuration of project :capacitor-browser was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-camera.
Required by:
project :app
> No matching configuration of project :capacitor-camera was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-device.
Required by:
project :app
> No matching configuration of project :capacitor-device was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-filesystem.
Required by:
project :app
> No matching configuration of project :capacitor-filesystem was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-geolocation.
Required by:
project :app
> No matching configuration of project :capacitor-geolocation was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-haptics.
Required by:
project :app
> No matching configuration of project :capacitor-haptics was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-keyboard.
Required by:
project :app
> No matching configuration of project :capacitor-keyboard was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-network.
Required by:
project :app
> No matching configuration of project :capacitor-network was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-preferences.
Required by:
project :app
> No matching configuration of project :capacitor-preferences was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-splash-screen.
Required by:
project :app
> No matching configuration of project :capacitor-splash-screen was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
> Could not resolve project :capacitor-status-bar.
Required by:
project :app
> No matching configuration of project :capacitor-status-bar was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1' but:
- None of the consumable configurations have attributes.
This is how the capacitor.settings.gradle file looks like and I see no problems with the paths there.
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
include ':capacitor-community-background-geolocation'
project(':capacitor-community-background-geolocation').projectDir = new File('../node_modules/@capacitor-community/background-geolocation/android')
include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
include ':capacitor-browser'
project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android')
include ':capacitor-camera'
project(':capacitor-camera').projectDir = new File('../node_modules/@capacitor/camera/android')
include ':capacitor-device'
project(':capacitor-device').projectDir = new File('../node_modules/@capacitor/device/android')
include ':capacitor-filesystem'
project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android')
include ':capacitor-geolocation'
project(':capacitor-geolocation').projectDir = new File('../node_modules/@capacitor/geolocation/android')
include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')
include ':capacitor-keyboard'
project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android')
include ':capacitor-network'
project(':capacitor-network').projectDir = new File('../node_modules/@capacitor/network/android')
include ':capacitor-preferences'
project(':capacitor-preferences').projectDir = new File('../node_modules/@capacitor/preferences/android')
include ':capacitor-splash-screen'
project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capacitor/splash-screen/android')
include ':capacitor-status-bar'
project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')
Screenshot below from Android Studio.
I would really appreciate, if I could some guidance fixing this issue. Thank you so much!